projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
40f1d85
)
VMCore/DebugInfo.cpp: DICompileUnit::getSubprograms(): Check numOperands().
author
NAKAMURA Takumi
<geek4civic@gmail.com>
Sat, 1 Dec 2012 02:23:45 +0000
(
02:23
+0000)
committer
NAKAMURA Takumi
<geek4civic@gmail.com>
Sat, 1 Dec 2012 02:23:45 +0000
(
02:23
+0000)
2012-11-30-misched-dbg.ll had crashed. Then (MDNode)N was "!{}".
I am not sure it would be ill-formed or not.
llvm-svn: 169074
llvm/lib/VMCore/DebugInfo.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/VMCore/DebugInfo.cpp
b/llvm/lib/VMCore/DebugInfo.cpp
index
5eea2ce
..
a4fd705
100644
(file)
--- a/
llvm/lib/VMCore/DebugInfo.cpp
+++ b/
llvm/lib/VMCore/DebugInfo.cpp
@@
-659,8
+659,9
@@
DIArray DICompileUnit::getSubprograms() const {
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();
}