aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
authorMicah Villmow <villmow@gmail.com>2012-10-24 18:36:13 +0000
committerMicah Villmow <villmow@gmail.com>2012-10-24 18:36:13 +0000
commitb52fb876171e3670e7307fda4459ca005d49d9f5 (patch)
treee3327db438225073f62c4f4733c814082c9abfe5 /lib/Analysis/InlineCost.cpp
parent199063ea37d8cc651a20ab00eef4326cd9331371 (diff)
Add some cleanup to the DataLayout changes requested by Chandler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166607 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/InlineCost.cpp')
-rw-r--r--lib/Analysis/InlineCost.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Analysis/InlineCost.cpp b/lib/Analysis/InlineCost.cpp
index ede1bf30db..64e183d60c 100644
--- a/lib/Analysis/InlineCost.cpp
+++ b/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<PointerType>(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;