summaryrefslogtreecommitdiff
path: root/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
commitdec9803b69ad6dcae9f6f1902e461214a26bd7e7 (patch)
tree13edaad54f603ae6ab2d01a44133a706d895be46 /tools/lto
parente0bda7df1abc5772228ecd287401806f19faae2a (diff)
downloadllvm-dec9803b69ad6dcae9f6f1902e461214a26bd7e7.tar.gz
llvm-dec9803b69ad6dcae9f6f1902e461214a26bd7e7.tar.bz2
llvm-dec9803b69ad6dcae9f6f1902e461214a26bd7e7.tar.xz
Switch some obvious clients to using the new TargetRegistry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75767 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto')
-rw-r--r--tools/lto/LTOCodeGenerator.cpp8
-rw-r--r--tools/lto/LTOModule.cpp6
2 files changed, 7 insertions, 7 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp
index b4c4e7767b..cb6c4ae6f5 100644
--- a/tools/lto/LTOCodeGenerator.cpp
+++ b/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/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp
index 38ee1cc7a2..be6543c8f7 100644
--- a/tools/lto/LTOModule.cpp
+++ b/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);
}