aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/Triple.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support/Triple.cpp')
-rw-r--r--lib/Support/Triple.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp
index fc3b3f7e2f..804769d04e 100644
--- a/lib/Support/Triple.cpp
+++ b/lib/Support/Triple.cpp
@@ -390,7 +390,10 @@ void Triple::setOS(OSType Kind) {
}
void Triple::setArchName(const StringRef &Str) {
- setTriple(Str + "-" + getVendorName() + "-" + getOSAndEnvironmentName());
+ // Work around a miscompilation bug in gcc 4.0.3.
+ Twine a = getVendorName() + "-" + getOSAndEnvironmentName();
+ Twine b = Str + "-" + a;
+ setTriple(b);
}
void Triple::setVendorName(const StringRef &Str) {