mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Simplify ComputeMultiple so that it doesn't depend on TargetData.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89175 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -105,9 +105,8 @@ static Value *computeArraySize(const CallInst *CI, const TargetData *TD,
|
||||
// return the multiple. Otherwise, return NULL.
|
||||
Value *MallocArg = CI->getOperand(1);
|
||||
Value *Multiple = NULL;
|
||||
APInt Val(TD->getTypeSizeInBits(MallocArg->getType()->getScalarType()), 0);
|
||||
if (ComputeMultiple(MallocArg, ElementSize, Multiple,
|
||||
Val, LookThroughSExt, TD))
|
||||
LookThroughSExt))
|
||||
return Multiple;
|
||||
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user