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
This commit is contained in:
Dan Gohman 2009-04-20 16:10:33 +00:00
parent c3bbf579ae
commit ba0941fbe0

View File

@ -1833,7 +1833,7 @@ void Value::print(raw_ostream &OS, AssemblyAnnotationWriter *AAW) const {
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;