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
This commit is contained in:
Fariborz Jahanian
2010-09-11 01:27:29 +00:00
parent 8f22a243b7
commit 933c6723a4
5 changed files with 31 additions and 8 deletions

View File

@@ -757,7 +757,7 @@ CodeGenFunction::GenerateBlockFunction(GlobalDecl GD, const BlockExpr *BExpr,
// 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);