aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDecl.cpp
diff options
context:
space:
mode:
authorKen Dyck <ken.dyck@onsemi.com>2010-01-26 13:48:07 +0000
committerKen Dyck <ken.dyck@onsemi.com>2010-01-26 13:48:07 +0000
commit687cc4a850b59116efee061018f0d8df50728b82 (patch)
tree96c2493c4ccccbe9ad2c9fb2569b2f02565f332b /lib/CodeGen/CGDecl.cpp
parent75345163535eb1765ba8fb971974be895645cb45 (diff)
Introduce CodeGenModule::GetTargetTypeStoreSize() to calculate the store size
of LLVM types in character units. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94542 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDecl.cpp')
-rw-r--r--lib/CodeGen/CGDecl.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp
index 23b4ff26a2..56feee4097 100644
--- a/lib/CodeGen/CGDecl.cpp
+++ b/lib/CodeGen/CGDecl.cpp
@@ -559,8 +559,7 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D) {
const llvm::Type *V1;
V1 = cast<llvm::PointerType>(DeclPtr->getType())->getElementType();
V = llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext),
- (CGM.getTargetData().getTypeStoreSizeInBits(V1)
- / 8));
+ CGM.GetTargetTypeStoreSize(V1).getQuantity());
Builder.CreateStore(V, size_field);
if (flags & BLOCK_HAS_COPY_DISPOSE) {