diff options
author | Chris Lattner <sabre@nondot.org> | 2005-11-06 06:48:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-11-06 06:48:53 +0000 |
commit | 30caa2876cd500b49e27b6810ab5dec96398c6fa (patch) | |
tree | b09e75c46f80f036a241c29d21920bcec28e46ad /lib/VMCore/AsmWriter.cpp | |
parent | 0019bbe19855b4cd41445a1ee893837c3d6f0043 (diff) | |
download | external_llvm-30caa2876cd500b49e27b6810ab5dec96398c6fa.zip external_llvm-30caa2876cd500b49e27b6810ab5dec96398c6fa.tar.gz external_llvm-30caa2876cd500b49e27b6810ab5dec96398c6fa.tar.bz2 |
print alignment info for globals and functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24212 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/AsmWriter.cpp')
-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 { |