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