[llvm-commits] CVS: llvm/lib/Target/X86/X86AsmPrinter.cpp
Anton Korobeynikov
asl at math.spbu.ru
Sun Oct 22 14:37:27 PDT 2006
Changes in directory llvm/lib/Target/X86:
X86AsmPrinter.cpp updated: 1.203 -> 1.204
---
Log message:
Do section switching right way for Mingw\Cygwin and Linux.
This will allow (after llvm-gcc linkage fix) more dummy tests using
libstdc++ to pass on mingw :)
---
Diffs of the changes: (+10 -4)
X86AsmPrinter.cpp | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
Index: llvm/lib/Target/X86/X86AsmPrinter.cpp
diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.203 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.204
--- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.203 Wed Oct 18 04:12:29 2006
+++ llvm/lib/Target/X86/X86AsmPrinter.cpp Sun Oct 22 16:37:13 2006
@@ -180,12 +180,18 @@
<< "\t.weak_definition " << name << "\n";
SwitchToDataSection(".section __DATA,__const_coal,coalesced", I);
} else if (Subtarget->isTargetCygwin()) {
- O << "\t.section\t.data$linkonce." << name << ",\"aw\"\n"
- << "\t.globl " << name << "\n"
+ std::string SectionName(".section\t.data$linkonce." +
+ name +
+ ",\"aw\"\n");
+ SwitchToDataSection(SectionName.c_str(), I);
+ O << "\t.globl " << name << "\n"
<< "\t.linkonce same_size\n";
} else {
- O << "\t.section\t.llvm.linkonce.d." << name << ",\"aw\", at progbits\n"
- << "\t.weak " << name << "\n";
+ std::string SectionName("\t.section\t.llvm.linkonce.d." +
+ name +
+ ",\"aw\", at progbits\n");
+ SwitchToDataSection(SectionName.c_str(), I);
+ O << "\t.weak " << name << "\n";
}
break;
case GlobalValue::AppendingLinkage:
More information about the llvm-commits
mailing list