[cfe-commits] r75814 - /cfe/trunk/lib/Frontend/Backend.cpp
Argiris Kirtzidis
akyrtzi at gmail.com
Wed Jul 15 11:59:48 PDT 2009
Author: akirtzidis
Date: Wed Jul 15 13:59:48 2009
New Revision: 75814
URL: http://llvm.org/viewvc/llvm-project?rev=75814&view=rev
Log:
Revert r75764 "[llvm up] Switch to using the new TargetRegistry" to fix build.
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=75814&r1=75813&r2=75814&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/Backend.cpp (original)
+++ cfe/trunk/lib/Frontend/Backend.cpp Wed Jul 15 13:59:48 2009
@@ -33,7 +33,7 @@
#include "llvm/Target/SubtargetFeature.h"
#include "llvm/Target/TargetData.h"
#include "llvm/Target/TargetMachine.h"
-#include "llvm/Target/TargetRegistry.h"
+#include "llvm/Target/TargetMachineRegistry.h"
using namespace clang;
using namespace llvm;
@@ -205,9 +205,9 @@
bool Fast = CompileOpts.OptimizationLevel == 0;
// Create the TargetMachine for generating code.
- const llvm::Target *TheTarget =
- TargetRegistry::getClosestStaticTargetForModule(*TheModule, Error);
- if (!TheTarget) {
+ const TargetMachineRegistry::entry *TME =
+ TargetMachineRegistry::getClosestStaticTargetForModule(*TheModule, Error);
+ if (!TME) {
Error = std::string("Unable to get target machine: ") + Error;
return false;
}
@@ -222,7 +222,7 @@
Features.AddFeature(*it);
FeaturesStr = Features.getString();
}
- TargetMachine *TM = TheTarget->createTargetMachine(*TheModule, FeaturesStr);
+ TargetMachine *TM = TME->CtorFn(*TheModule, FeaturesStr);
// Set register scheduler & allocation policy.
RegisterScheduler::setDefault(createDefaultScheduler);
More information about the cfe-commits
mailing list