forked from OSchip/llvm-project
Fix printing of function-local metadata in AsmWriter
llvm-svn: 93402
This commit is contained in:
parent
b816154268
commit
61e6e829c6
|
@ -2062,8 +2062,9 @@ void Value::print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW) const {
|
|||
else
|
||||
W.printAlias(cast<GlobalAlias>(GV));
|
||||
} else if (const MDNode *N = dyn_cast<MDNode>(this)) {
|
||||
SlotTracker SlotTable((Function*)0);
|
||||
AssemblyWriter W(OS, SlotTable, 0, AAW);
|
||||
Function *F = N->getFunction();
|
||||
SlotTracker SlotTable(F);
|
||||
AssemblyWriter W(OS, SlotTable, getModuleFromVal(F), AAW);
|
||||
W.printMDNodeBody(N);
|
||||
} else if (const NamedMDNode *N = dyn_cast<NamedMDNode>(this)) {
|
||||
SlotTracker SlotTable(N->getParent());
|
||||
|
|
Loading…
Reference in New Issue