1. Clean up code due to changes in SwitchTo*Section(2)
2. Added partial debug support for mingw\cygwin targets (the same as
Linux\ELF). Please note, that currently mingw\cygwin uses 'stabs' format
for storing debug info by default, thus many (runtime) libraries has
this information included. These formats shouldn't be mixed in one binary
('stabs' & 'DWARF'), otherwise binutils tools will be confused.
llvm-svn: 31311
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp
index bfd0e37..05761d1 100644
--- a/llvm/lib/CodeGen/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter.cpp
@@ -96,7 +96,7 @@
<< "\n" << TAI->getCommentString()
<< " End of file scope inline assembly\n";
- SwitchToDataSection("", 0); // Reset back to no section.
+ SwitchToDataSection(""); // Reset back to no section.
if (MachineDebugInfo *DebugInfo = getAnalysisToUpdate<MachineDebugInfo>()) {
DebugInfo->AnalyzeModule(M);
@@ -160,7 +160,7 @@
std::vector<std::pair<MachineConstantPoolEntry,unsigned> > &CP) {
if (CP.empty()) return;
- SwitchToDataSection(Section, 0);
+ SwitchToDataSection(Section);
EmitAlignment(Alignment);
for (unsigned i = 0, e = CP.size(); i != e; ++i) {
O << TAI->getPrivateGlobalPrefix() << "CPI" << getFunctionNumber() << '_'
@@ -203,7 +203,7 @@
if (TM.getRelocationModel() == Reloc::PIC_) {
TargetLowering *LoweringInfo = TM.getTargetLowering();
if (LoweringInfo && LoweringInfo->usesGlobalOffsetTable()) {
- SwitchToDataSection(TAI->getJumpTableDataSection(), 0);
+ SwitchToDataSection(TAI->getJumpTableDataSection());
if (TD->getPointerSize() == 8 && !JTEntryDirective)
JTEntryDirective = TAI->getData64bitsDirective();
} else {
@@ -213,7 +213,7 @@
SwitchToTextSection(getSectionForFunction(*F).c_str(), F);
}
} else {
- SwitchToDataSection(TAI->getJumpTableDataSection(), 0);
+ SwitchToDataSection(TAI->getJumpTableDataSection());
if (TD->getPointerSize() == 8)
JTEntryDirective = TAI->getData64bitsDirective();
}
@@ -279,14 +279,14 @@
}
if (GV->getName() == "llvm.global_ctors" && GV->use_empty()) {
- SwitchToDataSection(TAI->getStaticCtorsSection(), 0);
+ SwitchToDataSection(TAI->getStaticCtorsSection());
EmitAlignment(2, 0);
EmitXXStructorList(GV->getInitializer());
return true;
}
if (GV->getName() == "llvm.global_dtors" && GV->use_empty()) {
- SwitchToDataSection(TAI->getStaticDtorsSection(), 0);
+ SwitchToDataSection(TAI->getStaticDtorsSection());
EmitAlignment(2, 0);
EmitXXStructorList(GV->getInitializer());
return true;