Don't discard an AssemblyAnnotationWriter when writing GlobalValues,

which include Functions, where it can be quite useful to use an
AssemblyAnnotationWriter.

llvm-svn: 69598
This commit is contained in:
Dan Gohman 2009-04-20 16:10:33 +00:00
parent 0c58fa5080
commit 6c7a485c19
1 changed files with 1 additions and 1 deletions

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;