diff options
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 349e1bd..e770ea8 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -832,6 +832,10 @@ void AssemblyWriter::printGlobal(const GlobalVariable *GV) { assert(C && "GlobalVar initializer isn't constant?"); writeOperand(GV->getInitializer(), false, isa<GlobalValue>(C)); } + + if (GV->getAlignment()) { + Out << ", align " << GV->getAlignment(); + } printInfoComment(*GV); Out << "\n"; @@ -940,6 +944,9 @@ void AssemblyWriter::printFunction(const Function *F) { } Out << ')'; + if (F->getAlignment()) + Out << " align " << F->getAlignment(); + if (F->isExternal()) { Out << "\n"; } else { |