Don't crash when sending a message inside a block with the non-fragile ABI (GNU runtime).

llvm-svn: 109012
This commit is contained in:
David Chisnall 2010-07-21 15:28:28 +00:00
parent 7fa204edc7
commit 4715d161c0
1 changed files with 1 additions and 1 deletions

View File

@ -692,7 +692,7 @@ CGObjCGNU::GenerateMessageSend(CodeGen::CodeGenFunction &CGF,
Params.push_back(SelectorTy);
llvm::Value *self;
if (isa<ObjCMethodDecl>(CGF.CurFuncDecl)) {
if (isa<ObjCMethodDecl>(CGF.CurCodeDecl)) {
self = CGF.LoadObjCSelf();
} else {
self = llvm::ConstantPointerNull::get(IdTy);