diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2009-10-06 17:25:50 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2009-10-06 17:25:50 +0000 |
commit | 6cf4963cdc33f06031ebf86e0606afa4b79ccde5 (patch) | |
tree | aca709a86d34bae13b378090a5e5ee6769f4a23f /lib/Support/Triple.cpp | |
parent | 7963e159515bfb21c39739b84a1abc5b36c0a5a7 (diff) |
Fix PR5112, a miscompilation on gcc-4.0.3. Patch by Collin Winter!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83391 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Triple.cpp')
-rw-r--r-- | lib/Support/Triple.cpp | 5 |
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) { |