summaryrefslogtreecommitdiffstats
path: root/llvm/tools/lto
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-07-15 10:05:03 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-07-15 10:05:03 +0000
commita8d73996ceaa6a3fcc51993a4895c45d05b42c98 (patch)
tree6be1bc95132f855881edb0d908a076eca6a9df6e /llvm/tools/lto
parent776fe8db5f09cf55ae7aab2dbf546e01034f4352 (diff)
downloadbcm5719-llvm-a8d73996ceaa6a3fcc51993a4895c45d05b42c98.tar.gz
bcm5719-llvm-a8d73996ceaa6a3fcc51993a4895c45d05b42c98.zip
Switch some obvious clients to using the new TargetRegistry.
llvm-svn: 75767
Diffstat (limited to 'llvm/tools/lto')
-rw-r--r--llvm/tools/lto/LTOCodeGenerator.cpp8
-rw-r--r--llvm/tools/lto/LTOModule.cpp6
2 files changed, 7 insertions, 7 deletions
diff --git a/llvm/tools/lto/LTOCodeGenerator.cpp b/llvm/tools/lto/LTOCodeGenerator.cpp
index b4c4e7767b9..cb6c4ae6f5b 100644
--- a/llvm/tools/lto/LTOCodeGenerator.cpp
+++ b/llvm/tools/lto/LTOCodeGenerator.cpp
@@ -328,9 +328,9 @@ bool LTOCodeGenerator::determineTarget(std::string& errMsg)
if ( _target == NULL ) {
// create target machine from info for merged modules
Module* mergedModule = _linker.getModule();
- const TargetMachineRegistry::entry* march =
- TargetMachineRegistry::getClosestStaticTargetForModule(
- *mergedModule, errMsg);
+ const Target *march =
+ TargetRegistry::getClosestStaticTargetForModule(*mergedModule,
+ errMsg);
if ( march == NULL )
return true;
@@ -351,7 +351,7 @@ bool LTOCodeGenerator::determineTarget(std::string& errMsg)
// construct LTModule, hand over ownership of module and target
std::string FeatureStr =
getFeatureString(_linker.getModule()->getTargetTriple().c_str());
- _target = march->CtorFn(*mergedModule, FeatureStr.c_str());
+ _target = march->createTargetMachine(*mergedModule, FeatureStr.c_str());
}
return false;
}
diff --git a/llvm/tools/lto/LTOModule.cpp b/llvm/tools/lto/LTOModule.cpp
index 38ee1cc7a28..be6543c8f7f 100644
--- a/llvm/tools/lto/LTOModule.cpp
+++ b/llvm/tools/lto/LTOModule.cpp
@@ -147,15 +147,15 @@ LTOModule* LTOModule::makeLTOModule(MemoryBuffer* buffer,
if ( !m )
return NULL;
// find machine architecture for this module
- const TargetMachineRegistry::entry* march =
- TargetMachineRegistry::getClosestStaticTargetForModule(*m, errMsg);
+ const Target* march =
+ TargetRegistry::getClosestStaticTargetForModule(*m, errMsg);
if ( march == NULL )
return NULL;
// construct LTModule, hand over ownership of module and target
std::string FeatureStr = getFeatureString(m->getTargetTriple().c_str());
- TargetMachine* target = march->CtorFn(*m, FeatureStr);
+ TargetMachine* target = march->createTargetMachine(*m, FeatureStr);
return new LTOModule(m.take(), target);
}
OpenPOWER on IntegriCloud