aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-08-17 19:14:29 +0000
committerChris Lattner <sabre@nondot.org>2004-08-17 19:14:29 +0000
commitbfddc2030a7e67b9e0c42276525d6932375ff261 (patch)
treeda76fcec614d09668443ec641fdda0e1a3ee757d /lib/CodeGen/AsmPrinter.cpp
parentd2b0bb41f45c1d2381904221c780da8f750d2823 (diff)
Add support for alignment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15888 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp
index 5fb356e58f..35733c8564 100644
--- a/lib/CodeGen/AsmPrinter.cpp
+++ b/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) {