[llvm-commits] [llvm] r84261 - /llvm/trunk/lib/Analysis/MallocHelper.cpp
Victor Hernandez
vhernandez at apple.com
Fri Oct 16 11:08:18 PDT 2009
Author: hernande
Date: Fri Oct 16 13:08:17 2009
New Revision: 84261
URL: http://llvm.org/viewvc/llvm-project?rev=84261&view=rev
Log:
Invert isSafeToGetMallocArraySize check because we return NULL when we don't know the size.
Thanks to Duncan Sands for noticing this bug.
Modified:
llvm/trunk/lib/Analysis/MallocHelper.cpp
Modified: llvm/trunk/lib/Analysis/MallocHelper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MallocHelper.cpp?rev=84261&r1=84260&r2=84261&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/MallocHelper.cpp (original)
+++ llvm/trunk/lib/Analysis/MallocHelper.cpp Fri Oct 16 13:08:17 2009
@@ -234,7 +234,7 @@
/// 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.
More information about the llvm-commits
mailing list