summaryrefslogtreecommitdiffstats
path: root/tools/lto
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lto')
-rw-r--r--tools/lto/LTOCodeGenerator.cpp5
-rw-r--r--tools/lto/LTOModule.cpp5
2 files changed, 6 insertions, 4 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp
index 1010592..59e8405 100644
--- a/tools/lto/LTOCodeGenerator.cpp
+++ b/tools/lto/LTOCodeGenerator.cpp
@@ -300,8 +300,9 @@ bool LTOCodeGenerator::determineTarget(std::string& errMsg)
}
// construct LTModule, hand over ownership of module and target
- const std::string FeatureStr =
- SubtargetFeatures::getDefaultSubtargetFeatures(llvm::Triple(Triple));
+ SubtargetFeatures Features;
+ Features.getDefaultSubtargetFeatures("" /* cpu */, llvm::Triple(Triple));
+ std::string FeatureStr = Features.getString();
_target = march->createTargetMachine(Triple, FeatureStr);
}
return false;
diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp
index b269e78..0870205 100644
--- a/tools/lto/LTOModule.cpp
+++ b/tools/lto/LTOModule.cpp
@@ -140,8 +140,9 @@ LTOModule* LTOModule::makeLTOModule(MemoryBuffer* buffer,
return NULL;
// construct LTModule, hand over ownership of module and target
- const std::string FeatureStr =
- SubtargetFeatures::getDefaultSubtargetFeatures(llvm::Triple(Triple));
+ SubtargetFeatures Features;
+ Features.getDefaultSubtargetFeatures("" /* cpu */, llvm::Triple(Triple));
+ std::string FeatureStr = Features.getString();
TargetMachine* target = march->createTargetMachine(Triple, FeatureStr);
return new LTOModule(m.take(), target);
}
OpenPOWER on IntegriCloud