print section info

llvm-svn: 24313
This commit is contained in:
Chris Lattner 2005-11-12 00:10:19 +00:00
parent 63aaf38163
commit 5b42a5ea1a

View File

@ -833,9 +833,10 @@ void AssemblyWriter::printGlobal(const GlobalVariable *GV) {
writeOperand(GV->getInitializer(), false, isa<GlobalValue>(C));
}
if (GV->getAlignment()) {
if (GV->hasSection())
Out << ", section \"" << GV->getSection() << '"';
if (GV->getAlignment())
Out << ", align " << GV->getAlignment();
}
printInfoComment(*GV);
Out << "\n";
@ -944,6 +945,8 @@ void AssemblyWriter::printFunction(const Function *F) {
}
Out << ')';
if (F->hasSection())
Out << " section \"" << F->getSection() << '"';
if (F->getAlignment())
Out << " align " << F->getAlignment();