Eliminate some redundant newlines in asm output.
authorDan Gohman <gohman@apple.com>
Thu, 14 Jun 2007 15:00:27 +0000 (15:00 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 14 Jun 2007 15:00:27 +0000 (15:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37574 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetAsmInfo.h
lib/Target/TargetAsmInfo.cpp
lib/Target/X86/X86ATTAsmPrinter.cpp
lib/Target/X86/X86AsmPrinter.cpp

index 7e96c095da3047f2172c68c28e350538f2194e75..4e6d3b991ced2fb8fbbd65fd9034a48da2c63030 100644 (file)
@@ -178,12 +178,12 @@ namespace llvm {
     
     /// ConstantPoolSection - This is the section that we SwitchToSection right
     /// before emitting the constant pool for a function.
-    const char *ConstantPoolSection;      // Defaults to "\t.section .rodata\n"
+    const char *ConstantPoolSection;      // Defaults to "\t.section .rodata"
 
     /// JumpTableDataSection - This is the section that we SwitchToSection right
     /// before emitting the jump tables for a function when the relocation model
     /// is not PIC.
-    const char *JumpTableDataSection;     // Defaults to "\t.section .rodata\n"
+    const char *JumpTableDataSection;     // Defaults to "\t.section .rodata"
     
     /// JumpTableDirective - if non-null, the directive to emit before a jump
     /// table.
index 79186789ba0f0dbd29182e0ec28a35bd3aa4fbee..df7a2ec78d1487fa1981c539bb6848c43f57cf48 100644 (file)
@@ -55,8 +55,8 @@ TargetAsmInfo::TargetAsmInfo() :
   TextSectionStartSuffix(""),
   DataSectionStartSuffix(""),
   SectionEndDirectiveSuffix(0),
-  ConstantPoolSection("\t.section .rodata\n"),
-  JumpTableDataSection("\t.section .rodata\n"),
+  ConstantPoolSection("\t.section .rodata"),
+  JumpTableDataSection("\t.section .rodata"),
   JumpTableDirective(0),
   CStringSection(0),
   StaticCtorsSection("\t.section .ctors,\"aw\",@progbits"),
index e3bb967f2a5b1d5fde899ddd19c04b7c7f1bcfde..970f0461f65fbe20509a3a304bc26789f6e3f1e6 100755 (executable)
@@ -59,10 +59,10 @@ std::string X86ATTAsmPrinter::getSectionForFunction(const Function &F) const {
     if (Subtarget->isTargetDarwin()) {
       return ".section __TEXT,__textcoal_nt,coalesced,pure_instructions";
     } else if (Subtarget->isTargetCygMing()) {
-      return "\t.section\t.text$linkonce." + CurrentFnName + ",\"ax\"\n";
+      return "\t.section\t.text$linkonce." + CurrentFnName + ",\"ax\"";
     } else {
       return "\t.section\t.llvm.linkonce.t." + CurrentFnName +
-             ",\"ax\",@progbits\n";
+             ",\"ax\",@progbits";
     }
   }
 }
index 3a5889d73167a87bc64bd7a04f750dfc33f7a677..40b633fee4379e8003be528342d8f5308283522e 100644 (file)
@@ -307,7 +307,6 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
         ExtWeakSymbols.insert(GV);
 
     EmitGlobalConstant(C);
-    O << '\n';
   }
   
   // Output linker support code for dllexported globals