From: David Chisnall Date: Wed, 21 Jul 2010 15:28:28 +0000 (+0000) Subject: Don't crash when sending a message inside a block with the non-fragile ABI (GNU runtime). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f69ea958964ab0452299f1df68ce469b67d18d3a;p=clang Don't crash when sending a message inside a block with the non-fragile ABI (GNU runtime). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109012 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp index 41c1a2a750..7fd2d36122 100644 --- a/lib/CodeGen/CGObjCGNU.cpp +++ b/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);