summaryrefslogtreecommitdiff
path: root/lib/LTO
diff options
context:
space:
mode:
Diffstat (limited to 'lib/LTO')
-rw-r--r--lib/LTO/LTOCodeGenerator.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/LTO/LTOCodeGenerator.cpp b/lib/LTO/LTOCodeGenerator.cpp
index da74c57c58..105fb6900d 100644
--- a/lib/LTO/LTOCodeGenerator.cpp
+++ b/lib/LTO/LTOCodeGenerator.cpp
@@ -301,8 +301,9 @@ bool LTOCodeGenerator::determineTarget(std::string &errMsg) {
break;
}
- // construct LTOModule, hand over ownership of module and target
- SubtargetFeatures Features;
+ // Construct LTOModule, hand over ownership of module and target. Use MAttr as
+ // the default set of features.
+ SubtargetFeatures Features(MAttr);
Features.getDefaultSubtargetFeatures(Triple);
std::string FeatureStr = Features.getString();
// Set a default CPU for Darwin triples.