mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-09 01:38:03 +00:00
Make printing of metadata more robust when function is not found (which is the normal situation for non function-local metadata)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93748 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d58816f898
commit
38812dff7d
@ -2064,7 +2064,7 @@ void Value::print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW) const {
|
||||
} else if (const MDNode *N = dyn_cast<MDNode>(this)) {
|
||||
Function *F = N->getFunction();
|
||||
SlotTracker SlotTable(F);
|
||||
AssemblyWriter W(OS, SlotTable, getModuleFromVal(F), AAW);
|
||||
AssemblyWriter W(OS, SlotTable, F ? getModuleFromVal(F) : 0, AAW);
|
||||
W.printMDNodeBody(N);
|
||||
} else if (const NamedMDNode *N = dyn_cast<NamedMDNode>(this)) {
|
||||
SlotTracker SlotTable(N->getParent());
|
||||
|
Loading…
x
Reference in New Issue
Block a user