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
This commit is contained in:
Daniel Dunbar
2009-07-15 10:05:03 +00:00
parent e0bda7df1a
commit dec9803b69
3 changed files with 17 additions and 16 deletions

View File

@@ -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;
}