Skip to content

Commit

Permalink
use OutStreamer.EmitCodeAlignment for alignment in the text
Browse files Browse the repository at this point in the history
segment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96967 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
lattner committed Feb 23, 2010
1 parent ec167fd commit 2cce371
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -917,11 +917,10 @@ void AsmPrinter::EmitAlignment(unsigned NumBits, const GlobalValue *GV,

if (NumBits == 0) return; // No need to emit alignment.

unsigned FillValue = 0;
if (getCurrentSection()->getKind().isText())
FillValue = MAI->getTextAlignFillValue();

OutStreamer.EmitValueToAlignment(1 << NumBits, FillValue, 1, 0);
OutStreamer.EmitCodeAlignment(1 << NumBits);
else
OutStreamer.EmitValueToAlignment(1 << NumBits, 0, 1, 0);
}

/// LowerConstant - Lower the specified LLVM Constant to an MCExpr.
Expand Down

0 comments on commit 2cce371

Please sign in to comment.