aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 265bb7893b..2223f65acf 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -1569,8 +1569,8 @@ static llvm::Value *CreateCoercedLoad(llvm::Value *SrcPtr,
CodeGenFunction &CGF) {
const llvm::Type *SrcTy =
cast<llvm::PointerType>(SrcPtr->getType())->getElementType();
- uint64_t SrcSize = CGF.CGM.getTargetData().getTypePaddedSize(SrcTy);
- uint64_t DstSize = CGF.CGM.getTargetData().getTypePaddedSize(Ty);
+ uint64_t SrcSize = CGF.CGM.getTargetData().getTypeAllocSize(SrcTy);
+ uint64_t DstSize = CGF.CGM.getTargetData().getTypeAllocSize(Ty);
// If load is legal, just bitcast the src pointer.
if (SrcSize == DstSize) {
@@ -1608,8 +1608,8 @@ static void CreateCoercedStore(llvm::Value *Src,
const llvm::Type *DstTy =
cast<llvm::PointerType>(DstPtr->getType())->getElementType();
- uint64_t SrcSize = CGF.CGM.getTargetData().getTypePaddedSize(SrcTy);
- uint64_t DstSize = CGF.CGM.getTargetData().getTypePaddedSize(DstTy);
+ uint64_t SrcSize = CGF.CGM.getTargetData().getTypeAllocSize(SrcTy);
+ uint64_t DstSize = CGF.CGM.getTargetData().getTypeAllocSize(DstTy);
// If store is legal, just bitcast the src pointer.
if (SrcSize == DstSize) {