print alignment info for globals and functions

llvm-svn: 24212
This commit is contained in:
Chris Lattner 2005-11-06 06:48:53 +00:00
parent 840f789433
commit f8a974d169
1 changed files with 7 additions and 0 deletions

View File

@ -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 {