]> granicus.if.org Git - clang/commit
[CodeGenObjC] Handle exceptions when calling objc_alloc or objc_allocWithZone
authorErik Pilkington <erik.pilkington@gmail.com>
Wed, 30 Jan 2019 23:17:38 +0000 (23:17 +0000)
committerErik Pilkington <erik.pilkington@gmail.com>
Wed, 30 Jan 2019 23:17:38 +0000 (23:17 +0000)
commitd006280585434ee43aa8c9c3e9b5588a68105279
treece910ef8507c2881dd74d103f47e88c14acab92d
parentfb3023497a11e4dc7d1c032dfc13dabd28791781
[CodeGenObjC] Handle exceptions when calling objc_alloc or objc_allocWithZone

objc_alloc and objc_allocWithZone may throw exceptions if the
underlying method does. If we're in a @try block, then make sure we
emit an invoke instead of a call.

rdar://47610407

Differential revision: https://reviews.llvm.org/D57476

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352687 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGObjC.cpp
test/CodeGenObjC/convert-messages-to-runtime-calls.m