diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-07-25 23:35:07 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-07-25 23:35:07 +0000 |
commit | 73a259a9d1814912255aee6c185c5aeb7bb581ba (patch) | |
tree | e6a8966841cd142e2bebe5ba6a39d823a54e5450 /lib/CodeGen/AsmPrinter.cpp | |
parent | d88ea4d9aa3f70d30963a1eec2a210c9aef6e24b (diff) |
EmitAlignment() also emits optional fill value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40500 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index 586472c38e..7e07d84800 100644 --- a/lib/CodeGen/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter.cpp @@ -621,14 +621,17 @@ void AsmPrinter::EmitString(const std::string &String) const { // Align = std::max(Align, ForcedAlignBits); // void AsmPrinter::EmitAlignment(unsigned NumBits, const GlobalValue *GV, - unsigned ForcedAlignBits) const { + unsigned ForcedAlignBits, bool UseFillExpr, + unsigned FillValue) const { if (GV && GV->getAlignment()) NumBits = Log2_32(GV->getAlignment()); NumBits = std::max(NumBits, ForcedAlignBits); if (NumBits == 0) return; // No need to emit alignment. if (TAI->getAlignmentIsInBytes()) NumBits = 1 << NumBits; - O << TAI->getAlignDirective() << NumBits << "\n"; + O << TAI->getAlignDirective() << NumBits; + if (UseFillExpr) O << ",0x" << std::hex << FillValue << std::dec; + O << "\n"; } |