[cfe-commits] r77108 - /cfe/trunk/lib/Frontend/Backend.cpp
Daniel Dunbar
daniel at zuster.org
Sat Jul 25 18:27:27 PDT 2009
Author: ddunbar
Date: Sat Jul 25 20:27:26 2009
New Revision: 77108
URL: http://llvm.org/viewvc/llvm-project?rev=77108&view=rev
Log:
Lookup targets by Triple instead of Module.
Modified:
cfe/trunk/lib/Frontend/Backend.cpp
Modified: cfe/trunk/lib/Frontend/Backend.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/Backend.cpp?rev=77108&r1=77107&r2=77108&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/Backend.cpp (original)
+++ cfe/trunk/lib/Frontend/Backend.cpp Sat Jul 25 20:27:26 2009
@@ -205,8 +205,9 @@
bool Fast = CompileOpts.OptimizationLevel == 0;
// Create the TargetMachine for generating code.
+ std::string Triple = TheModule->getTargetTriple();
const llvm::Target *TheTarget =
- TargetRegistry::getClosestStaticTargetForModule(*TheModule, Error);
+ TargetRegistry::getClosestStaticTargetForTriple(Triple, Error);
if (!TheTarget) {
Error = std::string("Unable to get target machine: ") + Error;
return false;
More information about the cfe-commits
mailing list