diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2006-10-31 08:31:24 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2006-10-31 08:31:24 +0000 |
commit | ab4022f196059745c0ca0780b71a80fa67e896be (patch) | |
tree | 742dfb8841ee2a9e5852a81bc3770321aaae38ea /lib/CodeGen/AsmPrinter.cpp | |
parent | d03f1581c8a854fdbe4f5a738e9322341c2bc77f (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31311 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index bfd0e37924..05761d1647 100644 --- a/lib/CodeGen/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter.cpp @@ -96,7 +96,7 @@ bool AsmPrinter::doInitialization(Module &M) { << "\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 @@ void AsmPrinter::EmitConstantPool(unsigned Alignment, const char *Section, 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 @@ void AsmPrinter::EmitJumpTableInfo(MachineJumpTableInfo *MJTI, 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 @@ void AsmPrinter::EmitJumpTableInfo(MachineJumpTableInfo *MJTI, 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 @@ bool AsmPrinter::EmitSpecialLLVMGlobal(const GlobalVariable *GV) { } 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; |