From ba0941fbe0db832b0bdca450688b63ddf6a45b0a Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 20 Apr 2009 16:10:33 +0000 Subject: [PATCH] Don't discard an AssemblyAnnotationWriter when writing GlobalValues, which include Functions, where it can be quite useful to use an AssemblyAnnotationWriter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69598 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/AsmWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index e4dd9d6b83e..f007c7645cc 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -1833,7 +1833,7 @@ void Value::print(raw_ostream &OS, AssemblyAnnotationWriter *AAW) const { W.write(BB); } else if (const GlobalValue *GV = dyn_cast(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(this)) { TypePrinting TypePrinter;