Revert 75762, 75763, 75766..75769, 75772..75775, 75778, 75780, 75782 to repair broken LLVM-GCC build.
Will revert 75770 in the llvm-gcc trunk.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75799 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp
index cb6c4ae..b4c4e77 100644
--- a/tools/lto/LTOCodeGenerator.cpp
+++ b/tools/lto/LTOCodeGenerator.cpp
@@ -328,9 +328,9 @@
if ( _target == NULL ) {
// create target machine from info for merged modules
Module* mergedModule = _linker.getModule();
- const Target *march =
- TargetRegistry::getClosestStaticTargetForModule(*mergedModule,
- errMsg);
+ const TargetMachineRegistry::entry* march =
+ TargetMachineRegistry::getClosestStaticTargetForModule(
+ *mergedModule, errMsg);
if ( march == NULL )
return true;
@@ -351,7 +351,7 @@
// construct LTModule, hand over ownership of module and target
std::string FeatureStr =
getFeatureString(_linker.getModule()->getTargetTriple().c_str());
- _target = march->createTargetMachine(*mergedModule, FeatureStr.c_str());
+ _target = march->CtorFn(*mergedModule, FeatureStr.c_str());
}
return false;
}