print alignment info for globals and functions
authorChris Lattner <sabre@nondot.org>
Sun, 6 Nov 2005 06:48:53 +0000 (06:48 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 6 Nov 2005 06:48:53 +0000 (06:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24212 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/AsmWriter.cpp

index 349e1bd15fdc56e50e7805a2057cd302cce74966..e770ea855f11ae0195a6a06a1c91831f592f934a 100644 (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 {