summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit1d35c1673f3dcc9ab321d6caae53a8322bfd683b (patch)
treeeb2221b6097d6c8d803f4beb9a166378e31edc2e /llvm/lib/CodeGen/AsmPrinter.cpp
parent0c2ab8a9d4963a9fd282d59c90422b3b05dd498d (diff)
downloadbcm5719-llvm-1d35c1673f3dcc9ab321d6caae53a8322bfd683b.tar.gz
bcm5719-llvm-1d35c1673f3dcc9ab321d6caae53a8322bfd683b.zip
Add support for alignment
llvm-svn: 15888
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter.cpp6
1 files changed, 6 insertions, 0 deletions
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) {
OpenPOWER on IntegriCloud