Just use getParent() instead of getModuleFromVal when the value is a Function.
llvm-svn: 108358
This commit is contained in:
parent
efb8dbb3f1
commit
1513217e27
|
@ -2129,7 +2129,7 @@ void Value::print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW) const {
|
|||
} else if (const MDNode *N = dyn_cast<MDNode>(this)) {
|
||||
const Function *F = N->getFunction();
|
||||
SlotTracker SlotTable(F);
|
||||
AssemblyWriter W(OS, SlotTable, F ? getModuleFromVal(F) : 0, AAW);
|
||||
AssemblyWriter W(OS, SlotTable, F ? F->getParent() : 0, AAW);
|
||||
W.printMDNodeBody(N);
|
||||
} else if (const NamedMDNode *N = dyn_cast<NamedMDNode>(this)) {
|
||||
SlotTracker SlotTable(N->getParent());
|
||||
|
|
Loading…
Reference in New Issue