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/Target/X86/X86AsmPrinter.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/Target/X86/X86AsmPrinter.cpp')
-rw-r--r-- | lib/Target/X86/X86AsmPrinter.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/X86AsmPrinter.cpp index 9ef0ad1027..41ce91a1a3 100644 --- a/lib/Target/X86/X86AsmPrinter.cpp +++ b/lib/Target/X86/X86AsmPrinter.cpp @@ -116,7 +116,7 @@ bool X86SharedAsmPrinter::doInitialization(Module &M) { // Emit initial debug information. DW.BeginModule(&M); - } else if (Subtarget->isTargetELF()) { + } else if (Subtarget->isTargetELF() || Subtarget->isTargetCygwin()) { // Emit initial debug information. DW.BeginModule(&M); } @@ -253,7 +253,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) { // Output linker support code for dllexported globals if (DLLExportedGVs.begin() != DLLExportedGVs.end()) { - SwitchToDataSection(".section .drectve", 0); + SwitchToDataSection(".section .drectve"); } for (std::set<std::string>::iterator i = DLLExportedGVs.begin(), @@ -263,7 +263,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) { } if (DLLExportedFns.begin() != DLLExportedFns.end()) { - SwitchToDataSection(".section .drectve", 0); + SwitchToDataSection(".section .drectve"); } for (std::set<std::string>::iterator i = DLLExportedFns.begin(), @@ -273,7 +273,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) { } if (Subtarget->isTargetDarwin()) { - SwitchToDataSection("", 0); + SwitchToDataSection(""); // Output stubs for dynamically-linked functions unsigned j = 1; @@ -291,7 +291,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) { // Output stubs for external and common global variables. if (GVStubs.begin() != GVStubs.end()) SwitchToDataSection( - ".section __IMPORT,__pointers,non_lazy_symbol_pointers", 0); + ".section __IMPORT,__pointers,non_lazy_symbol_pointers"); for (std::set<std::string>::iterator i = GVStubs.begin(), e = GVStubs.end(); i != e; ++i) { O << "L" << *i << "$non_lazy_ptr:\n"; @@ -308,7 +308,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) { // linker can safely perform dead code stripping. Since LLVM never // generates code that does this, it is always safe to set. O << "\t.subsections_via_symbols\n"; - } else if (Subtarget->isTargetELF()) { + } else if (Subtarget->isTargetELF() || Subtarget->isTargetCygwin()) { // Emit final debug information. DW.EndModule(); } |