aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjC.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-02-05 18:56:49 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-02-05 18:56:49 +0000
commitea48522e979957889fdaaa550beb4385601f66d3 (patch)
tree51aa5df9e3469445924c251ec529d062bb5ea92d /lib/CodeGen/CGObjC.cpp
parent2ca4f633b21c65e1a4edc2405a768d7f5db564eb (diff)
IRgen: Fix some CreateTempAlloca calls to use ConvertTypeForMem when that is
conceptually correct. Review appreciated (Chris, Eli, Anders). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95401 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjC.cpp')
-rw-r--r--lib/CodeGen/CGObjC.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp
index 896d2207ea..e03d7606c1 100644
--- a/lib/CodeGen/CGObjC.cpp
+++ b/lib/CodeGen/CGObjC.cpp
@@ -450,8 +450,8 @@ void CodeGenFunction::EmitObjCForCollectionStmt(const ObjCForCollectionStmt &S){
// Fast enumeration state.
QualType StateTy = getContext().getObjCFastEnumerationStateType();
- llvm::AllocaInst *StatePtr = CreateTempAlloca(ConvertType(StateTy),
- "state.ptr");
+ llvm::AllocaInst *StatePtr = CreateTempAlloca(ConvertTypeForMem(
+ StateTy), "state.ptr");
StatePtr->setAlignment(getContext().getTypeAlign(StateTy) >> 3);
EmitMemSetToZero(StatePtr, StateTy);
@@ -470,7 +470,8 @@ void CodeGenFunction::EmitObjCForCollectionStmt(const ObjCForCollectionStmt &S){
getContext().getConstantArrayType(getContext().getObjCIdType(),
llvm::APInt(32, NumItems),
ArrayType::Normal, 0);
- llvm::Value *ItemsPtr = CreateTempAlloca(ConvertType(ItemsTy), "items.ptr");
+ llvm::Value *ItemsPtr = CreateTempAlloca(ConvertTypeForMem(
+ ItemsTy), "items.ptr");
llvm::Value *Collection = EmitScalarExpr(S.getCollection());