diff options
Diffstat (limited to 'tools/lto')
-rw-r--r-- | tools/lto/LTOCodeGenerator.cpp | 8 | ||||
-rw-r--r-- | tools/lto/LTOModule.cpp | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp index 9596057..5176359 100644 --- a/tools/lto/LTOCodeGenerator.cpp +++ b/tools/lto/LTOCodeGenerator.cpp @@ -329,9 +329,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; @@ -352,7 +352,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 38ee1cc..be6543c 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); } |