Add support for alignment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15888 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2004-08-17 19:14:29 +00:00
parent d2b0bb41f4
commit bfddc2030a
2 changed files with 27 additions and 2 deletions

View File

@ -33,6 +33,12 @@ void AsmPrinter::setupMachineFunction(MachineFunction &MF) {
CurrentFnName = Mang->getValueName((Value*)MF.getFunction());
}
// emitAlignment - Emit an alignment directive to the specified power of two.
void AsmPrinter::emitAlignment(unsigned NumBits) const {
if (AlignmentIsInBytes) NumBits = 1 << NumBits;
O << AlignDirective << NumBits << "\n";
}
// Print out the specified constant, without a storage class. Only the
// constants valid in constant expressions can occur here.
void AsmPrinter::emitConstantValueOnly(const Constant *CV) {