aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.cpp')
-rw-r--r--clang/lib/CodeGen/CGBlocks.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp
index 41bb8d1..bfa9b0a2 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/lib/CodeGen/CGBlocks.cpp
@@ -2590,10 +2590,6 @@ const BlockByrefInfo &CodeGenFunction::getBlockByrefInfo(const VarDecl *D) {
if (it != BlockByrefInfos.end())
return it->second;
- llvm::StructType *byrefType =
- llvm::StructType::create(getLLVMContext(),
- "struct.__block_byref_" + D->getNameAsString());
-
QualType Ty = D->getType();
CharUnits size;
@@ -2658,7 +2654,9 @@ const BlockByrefInfo &CodeGenFunction::getBlockByrefInfo(const VarDecl *D) {
}
types.push_back(varTy);
- byrefType->setBody(types, packed);
+ llvm::StructType *byrefType = llvm::StructType::create(
+ getLLVMContext(), types, "struct.__block_byref_" + D->getNameAsString(),
+ packed);
BlockByrefInfo info;
info.Type = byrefType;