diff options
Diffstat (limited to 'lib/Target/X86/X86IntelAsmPrinter.cpp')
-rwxr-xr-x | lib/Target/X86/X86IntelAsmPrinter.cpp | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/lib/Target/X86/X86IntelAsmPrinter.cpp b/lib/Target/X86/X86IntelAsmPrinter.cpp index 900f67e9b8..747d576695 100755 --- a/lib/Target/X86/X86IntelAsmPrinter.cpp +++ b/lib/Target/X86/X86IntelAsmPrinter.cpp @@ -28,6 +28,7 @@ X86IntelAsmPrinter::X86IntelAsmPrinter(std::ostream &O, X86TargetMachine &TM) GlobalPrefix = "_"; PrivateGlobalPrefix = "$"; AlignDirective = "\talign\t"; + MLSections = true; ZeroDirective = "\tdb\t"; ZeroDirectiveSuffix = " dup(0)"; AsciiDirective = "\tdb\t"; @@ -443,36 +444,11 @@ bool X86IntelAsmPrinter::doInitialization(Module &M) { bool X86IntelAsmPrinter::doFinalization(Module &M) { X86SharedAsmPrinter::doFinalization(M); - if (CurrentSection != "") - O << CurrentSection << "\tends\n"; + SwitchSection("", 0); O << "\tend\n"; return false; } -void X86IntelAsmPrinter::SwitchSection(const char *NewSection, - const GlobalValue *GV) { - if (*NewSection == 0) - return; - - std::string NS; - bool isData = strcmp(NewSection , ".data") == 0; - - if (GV && GV->hasSection()) - NS = GV->getSection(); - else if (isData) - NS = "_data"; - else - NS = "_text"; - - if (CurrentSection != NS) { - if (CurrentSection != "") - O << CurrentSection << "\tends\n"; - CurrentSection = NS; - O << CurrentSection << (isData ? "\tsegment 'DATA'\n" - : "\tsegment 'CODE'\n"); - } -} - void X86IntelAsmPrinter::EmitString(const ConstantArray *CVA) const { unsigned NumElts = CVA->getNumOperands(); if (NumElts) { |