projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d3e9f9
)
Add assertion to check for
author
Chris Lattner
<sabre@nondot.org>
Fri, 7 Sep 2001 16:25:42 +0000
(16:25 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 7 Sep 2001 16:25:42 +0000
(16:25 +0000)
alloca [int]
for example
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@429
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/iMemory.h
patch
|
blob
|
history
diff --git
a/include/llvm/iMemory.h
b/include/llvm/iMemory.h
index 5062cb61af4907bec06b9884c5c6727aea36fe77..5667da6c8ff1428c4e69a9f201cd80def8720563 100644
(file)
--- a/
include/llvm/iMemory.h
+++ b/
include/llvm/iMemory.h
@@
-33,6
+33,11
@@
public:
Operands.reserve(1);
Operands.push_back(Use(ArraySize, this));
+ } else {
+ // Make sure that the pointer is not to an unsized array!
+ assert(!getType()->getValueType()->isArrayType() ||
+ ((const ArrayType*)getType()->getValueType())->isSized() &&
+ "Trying to allocate unsized array without size!");
}
}