[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Nov 11 16:10:30 PST 2005



Changes in directory llvm/lib/VMCore:

AsmWriter.cpp updated: 1.184 -> 1.185
---
Log message:

print section info


---
Diffs of the changes:  (+7 -4)

 AsmWriter.cpp |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)


Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.184 llvm/lib/VMCore/AsmWriter.cpp:1.185
--- llvm/lib/VMCore/AsmWriter.cpp:1.184	Sun Nov  6 00:48:53 2005
+++ llvm/lib/VMCore/AsmWriter.cpp	Fri Nov 11 18:10:19 2005
@@ -833,10 +833,11 @@
     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,9 +945,11 @@
   }
   Out << ')';
 
+  if (F->hasSection())
+    Out << " section \"" << F->getSection() << '"';
   if (F->getAlignment())
     Out << " align " << F->getAlignment();
-  
+
   if (F->isExternal()) {
     Out << "\n";
   } else {






More information about the llvm-commits mailing list