Fixes an obscure bug in importd block variable layout
information when imported variable is used
more than once. Originally though to be a bug in importing
block varibles. Fixes radar 8417746.
llvm-svn: 113675
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp
index 04f1ef2..d4e703c 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/lib/CodeGen/CGBlocks.cpp
@@ -757,7 +757,7 @@
// Capture block layout info. here.
if (CGM.getContext().getLangOptions().ObjC1)
- BlockVarLayout = CGM.getObjCRuntime().GCBlockLayout(*this, Info.DeclRefs);
+ BlockVarLayout = CGM.getObjCRuntime().GCBlockLayout(*this, BlockLayout);
else
BlockVarLayout = llvm::Constant::getNullValue(PtrToInt8Ty);