[llvm-commits] [llvm] r93748 - /llvm/trunk/lib/VMCore/AsmWriter.cpp
Victor Hernandez
vhernandez at apple.com
Mon Jan 18 11:15:58 PST 2010
Author: hernande
Date: Mon Jan 18 13:15:57 2010
New Revision: 93748
URL: http://llvm.org/viewvc/llvm-project?rev=93748&view=rev
Log:
Make printing of metadata more robust when function is not found (which is the normal situation for non function-local metadata)
Modified:
llvm/trunk/lib/VMCore/AsmWriter.cpp
Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=93748&r1=93747&r2=93748&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/trunk/lib/VMCore/AsmWriter.cpp Mon Jan 18 13:15:57 2010
@@ -2064,7 +2064,7 @@
} 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());
More information about the llvm-commits
mailing list