[llvm-commits] [llvm] r83391 - /llvm/trunk/lib/Support/Triple.cpp
Jeffrey Yasskin
jyasskin at google.com
Tue Oct 6 10:25:50 PDT 2009
Author: jyasskin
Date: Tue Oct 6 12:25:50 2009
New Revision: 83391
URL: http://llvm.org/viewvc/llvm-project?rev=83391&view=rev
Log:
Fix PR5112, a miscompilation on gcc-4.0.3. Patch by Collin Winter!
Modified:
llvm/trunk/lib/Support/Triple.cpp
Modified: llvm/trunk/lib/Support/Triple.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Triple.cpp?rev=83391&r1=83390&r2=83391&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Triple.cpp (original)
+++ llvm/trunk/lib/Support/Triple.cpp Tue Oct 6 12:25:50 2009
@@ -390,7 +390,10 @@
}
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) {
More information about the llvm-commits
mailing list