OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7505faf
)
Add an assertion to catch attempts to access off the end of the array.
author
Duncan Sands
<baldrick@free.fr>
Mon, 10 May 2010 04:54:28 +0000
(
04:54
+0000)
committer
Duncan Sands
<baldrick@free.fr>
Mon, 10 May 2010 04:54:28 +0000
(
04:54
+0000)
Based on a patch by Javier Martinez.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103391
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index
e9de6d5
..
000cdb4
100644
(file)
--- a/
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@
-5428,6
+5428,8
@@
const EVT *SDNode::getValueTypeList(EVT VT) {
sys::SmartScopedLock<true> Lock(*VTMutex);
return &(*EVTs->insert(VT).first);
} else {
+ assert(VT.getSimpleVT().SimpleTy < MVT::LAST_VALUETYPE &&
+ "Value type out of range!");
return &SimpleVTArray->VTs[VT.getSimpleVT().SimpleTy];
}
}