Index: lib/Basic/Targets.cpp |
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp |
index 4cfd0cf62bb27ba115ca7ef0efd7e28cfe625760..d34bcfebdfe0f57f5a3746f824c9cf1c4116b369 100644 |
--- a/lib/Basic/Targets.cpp |
+++ b/lib/Basic/Targets.cpp |
@@ -3520,19 +3520,16 @@ public: |
return X86TargetInfo::validateOperandSize(Constraint, Size); |
} |
+ |
// @LOCALMOD-START |
- bool handleTargetFeatures(std::vector<std::string> &Features, |
- DiagnosticsEngine &Diags) override { |
+ bool handleLLVMArgs(std::vector<std::string> &Args) override { |
HasAlignedDouble = false; |
- auto it = std::find(Features.begin(), Features.end(), "+align-double"); |
- if (it != Features.end()) { |
+ auto it = std::find(Args.begin(), Args.end(), "-malign-double"); |
+ if (it != Args.end()) { |
HasAlignedDouble = true; |
- Features.erase(it); |
} |
- |
setDescriptionString(); |
- |
- return X86TargetInfo::handleTargetFeatures(Features, Diags); |
+ return true; |
} |
// @LOCALMOD-END |
}; |
@@ -7305,5 +7302,10 @@ TargetInfo::CreateTargetInfo(DiagnosticsEngine &Diags, |
if (!Target->handleTargetFeatures(Opts->Features, Diags)) |
return nullptr; |
+ // @LOCALMOD-START |
+ if (!Target->handleLLVMArgs(Opts->LLVMArgs)) |
+ return nullptr; |
+ // @LOCALMOD-END |
+ |
return Target.release(); |
} |