From bf3eeb2dfc1d7e4e4236ec1da7e20f58733b30cc Mon Sep 17 00:00:00 2001 From: Micah Villmow Date: Wed, 24 Oct 2012 18:36:13 +0000 Subject: Add some cleanup to the DataLayout changes requested by Chandler. llvm-svn: 166607 --- llvm/lib/Analysis/InlineCost.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/Analysis/InlineCost.cpp') diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp index ede1bf30dbf..64e183d60cf 100644 --- a/llvm/lib/Analysis/InlineCost.cpp +++ b/llvm/lib/Analysis/InlineCost.cpp @@ -828,8 +828,7 @@ bool CallAnalyzer::analyzeCall(CallSite CS) { // size of the byval type by the target's pointer size. PointerType *PTy = cast(CS.getArgument(I)->getType()); unsigned TypeSize = TD->getTypeSizeInBits(PTy->getElementType()); - unsigned AS = PTy->getAddressSpace(); - unsigned PointerSize = TD->getPointerSizeInBits(AS); + unsigned PointerSize = TD->getTypeSizeInBits(PTy); // Ceiling division. unsigned NumStores = (TypeSize + PointerSize - 1) / PointerSize; -- cgit v1.2.3