mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-04 05:31:51 +00:00
Invert isSafeToGetMallocArraySize check because we return NULL when we don't know the size.
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
This commit is contained in:
parent
3a73bb38ba
commit
136526ce2d
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user