summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2009-10-12 16:45:48 +0000
committerTanya Lattner <tonic@nondot.org>2009-10-12 16:45:48 +0000
commitf97bad7a6f86eb2c281e536f6df98a677165c997 (patch)
tree6ccd1608ff13afcd20eccb49a1e8ce1f593c492a
parente07cc230d9f5997fa5faa23fd9203a8429175325 (diff)
downloadllvm-f97bad7a6f86eb2c281e536f6df98a677165c997.tar.gz
Merge 83391 from mainline.
Fix PR5112, a miscompilation on gcc-4.0.3. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_26@83858 91177308-0d34-0410-b5e6-96231b3b80d8
-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 dd767e260cbc..6fde0c9eabda 100644
--- a/lib/Support/Triple.cpp
+++ b/lib/Support/Triple.cpp
@@ -326,7 +326,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) {