Update RustWrapper.cpp so that LLVM revision 134231 from June 30, 2011 at 22:15 GMT, works.

This commit is contained in:
Kelly Wilson
2011-07-01 00:56:49 -06:00
parent b4465aca5a
commit 1e4f198a1d

View File

@@ -85,7 +85,9 @@ extern "C" void LLVMRustWriteOutputFile(LLVMPassManagerRef PMR,
std::string Err;
const Target *TheTarget = TargetRegistry::lookupTarget(triple, Err);
std::string FeaturesStr;
TargetMachine *Target = TheTarget->createTargetMachine(triple, FeaturesStr);
std::string Trip(triple);
std::string CPUStr = llvm::sys::getHostCPUName();
TargetMachine *Target = TheTarget->createTargetMachine(Trip, CPUStr, FeaturesStr);
bool NoVerify = false;
PassManager *PM = unwrap<PassManager>(PMR);
std::string ErrorInfo;