summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorVictor Hernandez <vhernandez@apple.com>2009-10-16 18:08:17 +0000
committerVictor Hernandez <vhernandez@apple.com>2009-10-16 18:08:17 +0000
commit6f834660c947eb3d172fd84c49aafc671807d3bc (patch)
treefcc0cbd1f35f4cb910e7051a9711fe577b5cb477 /llvm/lib
parentc81923e07caea341b6b6ad6ecf9d3a7be65427bb (diff)
downloadbcm5719-llvm-6f834660c947eb3d172fd84c49aafc671807d3bc.tar.gz
bcm5719-llvm-6f834660c947eb3d172fd84c49aafc671807d3bc.zip
Invert isSafeToGetMallocArraySize check because we return NULL when we don't know the size.
Thanks to Duncan Sands for noticing this bug. llvm-svn: 84261
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/MallocHelper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/MallocHelper.cpp b/llvm/lib/Analysis/MallocHelper.cpp
index 41fdab9012f..e7bb41eeec2 100644
--- a/llvm/lib/Analysis/MallocHelper.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud