summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-19 06:12:02 +0000
committerChris Lattner <sabre@nondot.org>2009-08-19 06:12:02 +0000
commit37b7234a75b5bb979cf7d10f19a1d779bf5e026c (patch)
tree75948687b157619f577bfb419298d57be857db7b /llvm/lib/CodeGen
parent4b7dadb76ef179b5d898ab8fad30ad4ceef3c626 (diff)
downloadbcm5719-llvm-37b7234a75b5bb979cf7d10f19a1d779bf5e026c.tar.gz
bcm5719-llvm-37b7234a75b5bb979cf7d10f19a1d779bf5e026c.zip
switch asmprinter to emit alignments through OutStreamer.
llvm-svn: 79406
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 1762859e324..7d72b0cae58 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud