From 3dbb9e64d6e9d1e8bf16f75ebe4fe59ffdf93dd3 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 18 Nov 2009 00:58:27 +0000 Subject: 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 --- lib/Analysis/MemoryBuiltins.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/Analysis/MemoryBuiltins.cpp') diff --git a/lib/Analysis/MemoryBuiltins.cpp b/lib/Analysis/MemoryBuiltins.cpp index 9f036f4e2a..b4486283fe 100644 --- a/lib/Analysis/MemoryBuiltins.cpp +++ b/lib/Analysis/MemoryBuiltins.cpp @@ -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; -- cgit v1.2.3-18-g5258