From 4715d161c0c9ba5ea9be993086b91f35f0d97976 Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Wed, 21 Jul 2010 15:28:28 +0000 Subject: Don't crash when sending a message inside a block with the non-fragile ABI (GNU runtime). llvm-svn: 109012 --- clang/lib/CodeGen/CGObjCGNU.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CGObjCGNU.cpp') diff --git a/clang/lib/CodeGen/CGObjCGNU.cpp b/clang/lib/CodeGen/CGObjCGNU.cpp index 41c1a2a7506..7fd2d361224 100644 --- a/clang/lib/CodeGen/CGObjCGNU.cpp +++ b/clang/lib/CodeGen/CGObjCGNU.cpp @@ -692,7 +692,7 @@ CGObjCGNU::GenerateMessageSend(CodeGen::CodeGenFunction &CGF, Params.push_back(SelectorTy); llvm::Value *self; - if (isa(CGF.CurFuncDecl)) { + if (isa(CGF.CurCodeDecl)) { self = CGF.LoadObjCSelf(); } else { self = llvm::ConstantPointerNull::get(IdTy); -- cgit v1.2.3