From 60962dbfbaa4a9c3ca6fced08fb90b748aa99203 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 12 Nov 2005 00:10:19 +0000 Subject: [PATCH] print section info git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24313 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/AsmWriter.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index e770ea855f1..ecdc521457f 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -833,10 +833,11 @@ void AssemblyWriter::printGlobal(const GlobalVariable *GV) { writeOperand(GV->getInitializer(), false, isa(C)); } - if (GV->getAlignment()) { + if (GV->hasSection()) + Out << ", section \"" << GV->getSection() << '"'; + if (GV->getAlignment()) Out << ", align " << GV->getAlignment(); - } - + printInfoComment(*GV); Out << "\n"; } @@ -944,9 +945,11 @@ void AssemblyWriter::printFunction(const Function *F) { } Out << ')'; + if (F->hasSection()) + Out << " section \"" << F->getSection() << '"'; if (F->getAlignment()) Out << " align " << F->getAlignment(); - + if (F->isExternal()) { Out << "\n"; } else { -- 2.34.1