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:
3a73bb3
)
Invert isSafeToGetMallocArraySize check because we return NULL when we don't know...
author
Victor Hernandez
<vhernandez@apple.com>
Fri, 16 Oct 2009 18:08:17 +0000
(18:08 +0000)
committer
Victor Hernandez
<vhernandez@apple.com>
Fri, 16 Oct 2009 18:08:17 +0000
(18:08 +0000)
Thanks to Duncan Sands for noticing this bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84261
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Analysis/MallocHelper.cpp
patch
|
blob
|
history
diff --git
a/lib/Analysis/MallocHelper.cpp
b/lib/Analysis/MallocHelper.cpp
index 41fdab9012ff1c2c5ecd42f88c508a0e8fb5664c..e7bb41eeec287c60cb379bf6bba0f01673af0503 100644
(file)
--- a/
lib/Analysis/MallocHelper.cpp
+++ b/
lib/Analysis/MallocHelper.cpp
@@
-234,7
+234,7
@@
static bool isConstantOne(Value *val) {
/// determined.
Value* llvm::getMallocArraySize(CallInst* CI, LLVMContext &Context,
const TargetData* TD) {
- if (isSafeToGetMallocArraySize(CI, Context, TD))
+ if (
!
isSafeToGetMallocArraySize(CI, Context, TD))
return NULL;
// Match CreateMalloc's use of constant 1 array-size for non-array mallocs.