From 2a21c6e86101c857d683e7bdefb775654ccab7e3 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 10 Nov 2005 18:09:27 +0000 Subject: [PATCH] Compile C strings to: l1__2E_str_1: ; '.str_1' .asciz "foo" not: .align 0 l1__2E_str_1: ; '.str_1' .asciz "foo" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24273 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index ae569bd15ae..0ba39c22584 100644 --- a/lib/CodeGen/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter.cpp @@ -36,6 +36,7 @@ void AsmPrinter::setupMachineFunction(MachineFunction &MF) { // 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"; } -- 2.34.1