diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-19 06:12:02 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-19 06:12:02 +0000 |
commit | 663c2d2580e6e9b2435785c7e5a2de18758860a3 (patch) | |
tree | 49fefeadb202fe95fcb372787c5a1725a938b360 /lib/CodeGen | |
parent | 6c2f9e14fdf14d8c1c687c6bd9918183fa7f8a7f (diff) | |
download | external_llvm-663c2d2580e6e9b2435785c7e5a2de18758860a3.zip external_llvm-663c2d2580e6e9b2435785c7e5a2de18758860a3.tar.gz external_llvm-663c2d2580e6e9b2435785c7e5a2de18758860a3.tar.bz2 |
switch asmprinter to emit alignments through OutStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79406 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 1762859..7d72b0c 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -753,15 +753,12 @@ void AsmPrinter::EmitAlignment(unsigned NumBits, const GlobalValue *GV, NumBits = std::max(NumBits, ForcedAlignBits); if (NumBits == 0) return; // No need to emit alignment. - if (TAI->getAlignmentIsInBytes()) NumBits = 1 << NumBits; - O << TAI->getAlignDirective() << NumBits; - + + unsigned FillValue = 0; if (getCurrentSection()->getKind().isText()) - if (unsigned FillValue = TAI->getTextAlignFillValue()) { - O << ','; - PrintHex(FillValue); - } - O << '\n'; + FillValue = TAI->getTextAlignFillValue(); + + OutStreamer.EmitValueToAlignment(1 << NumBits, FillValue, 1, 0); } /// EmitZeros - Emit a block of zeros. |