More objc block variable layout info. work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110239 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index b30b44b..fea98ba 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -1690,8 +1690,12 @@
}
llvm::Constant *CGObjCCommonMac::GCBlockLayout(CodeGen::CodeGenFunction &CGF,
- const llvm::SmallVectorImpl<const BlockDeclRefExpr *> &BDRE) {
- return llvm::Constant::getNullValue(llvm::Type::getInt8PtrTy(VMContext));
+ const llvm::SmallVectorImpl<const BlockDeclRefExpr *> &DeclRefs) {
+ llvm::Constant *NullPtr =
+ llvm::Constant::getNullValue(llvm::Type::getInt8PtrTy(VMContext));
+ if (DeclRefs.empty())
+ return NullPtr;
+ return NullPtr;
}
llvm::Value *CGObjCMac::GenerateProtocolRef(CGBuilderTy &Builder,