[llvm-commits] [llvm] r69598 - /llvm/trunk/lib/VMCore/AsmWriter.cpp

Dan Gohman gohman at apple.com
Mon Apr 20 09:10:33 PDT 2009


Author: djg
Date: Mon Apr 20 11:10:33 2009
New Revision: 69598

URL: http://llvm.org/viewvc/llvm-project?rev=69598&view=rev
Log:
Don't discard an AssemblyAnnotationWriter when writing GlobalValues,
which include Functions, where it can be quite useful to use an
AssemblyAnnotationWriter.

Modified:
    llvm/trunk/lib/VMCore/AsmWriter.cpp

Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=69598&r1=69597&r2=69598&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/trunk/lib/VMCore/AsmWriter.cpp Mon Apr 20 11:10:33 2009
@@ -1833,7 +1833,7 @@
     W.write(BB);
   } else if (const GlobalValue *GV = dyn_cast<GlobalValue>(this)) {
     SlotTracker SlotTable(GV->getParent());
-    AssemblyWriter W(OS, SlotTable, GV->getParent(), 0);
+    AssemblyWriter W(OS, SlotTable, GV->getParent(), AAW);
     W.write(GV);
   } else if (const Constant *C = dyn_cast<Constant>(this)) {
     TypePrinting TypePrinter;





More information about the llvm-commits mailing list