From: Chris Lattner Date: Sun, 6 Nov 2005 06:48:53 +0000 (+0000) Subject: print alignment info for globals and functions X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=30caa2876cd500b49e27b6810ab5dec96398c6fa;p=oota-llvm.git print alignment info for globals and functions git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24212 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 349e1bd15fd..e770ea855f1 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(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 {