From 1d35c1673f3dcc9ab321d6caae53a8322bfd683b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 17 Aug 2004 19:14:29 +0000 Subject: Add support for alignment llvm-svn: 15888 --- llvm/lib/CodeGen/AsmPrinter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'llvm/lib/CodeGen/AsmPrinter.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp index 5fb356e58f0..35733c85646 100644 --- a/llvm/lib/CodeGen/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter.cpp @@ -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) { -- cgit v1.2.3