[llvm-commits] [llvm] r169074 - /llvm/trunk/lib/VMCore/DebugInfo.cpp
NAKAMURA Takumi
geek4civic at gmail.com
Fri Nov 30 18:23:45 PST 2012
Author: chapuni
Date: Fri Nov 30 20:23:45 2012
New Revision: 169074
URL: http://llvm.org/viewvc/llvm-project?rev=169074&view=rev
Log:
VMCore/DebugInfo.cpp: DICompileUnit::getSubprograms(): Check numOperands().
2012-11-30-misched-dbg.ll had crashed. Then (MDNode)N was "!{}".
I am not sure it would be ill-formed or not.
Modified:
llvm/trunk/lib/VMCore/DebugInfo.cpp
Modified: llvm/trunk/lib/VMCore/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/DebugInfo.cpp?rev=169074&r1=169073&r2=169074&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/DebugInfo.cpp (original)
+++ llvm/trunk/lib/VMCore/DebugInfo.cpp Fri Nov 30 20:23:45 2012
@@ -659,8 +659,9 @@
return DIArray();
if (MDNode *N = dyn_cast_or_null<MDNode>(DbgNode->getOperand(12)))
- if (MDNode *A = dyn_cast_or_null<MDNode>(N->getOperand(0)))
- return DIArray(A);
+ if (N->getNumOperands() > 0)
+ if (MDNode *A = dyn_cast_or_null<MDNode>(N->getOperand(0)))
+ return DIArray(A);
return DIArray();
}
More information about the llvm-commits
mailing list