[llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Nov 10 10:09:38 PST 2005



Changes in directory llvm/lib/CodeGen:

AsmPrinter.cpp updated: 1.21 -> 1.22
---
Log message:

Compile C strings to:

l1__2E_str_1:                           ; '.str_1'
        .asciz  "foo"

not:

        .align  0
l1__2E_str_1:                           ; '.str_1'
        .asciz  "foo"




---
Diffs of the changes:  (+1 -0)

 AsmPrinter.cpp |    1 +
 1 files changed, 1 insertion(+)


Index: llvm/lib/CodeGen/AsmPrinter.cpp
diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.21 llvm/lib/CodeGen/AsmPrinter.cpp:1.22
--- llvm/lib/CodeGen/AsmPrinter.cpp:1.21	Thu Nov 10 12:06:33 2005
+++ llvm/lib/CodeGen/AsmPrinter.cpp	Thu Nov 10 12:09:27 2005
@@ -36,6 +36,7 @@
 
 // emitAlignment - Emit an alignment directive to the specified power of two.
 void AsmPrinter::emitAlignment(unsigned NumBits) const {
+  if (NumBits == 0) return;   // No need to emit alignment.
   if (AlignmentIsInBytes) NumBits = 1 << NumBits;
   O << AlignDirective << NumBits << "\n";
 }






More information about the llvm-commits mailing list