[PATCH] D57476: [CodeGenObjC] Use an invoke instead of a call when calling `objc_alloc` or `objc_allocWithZone`
Erik Pilkington via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 30 14:40:28 PST 2019
erik.pilkington created this revision.
erik.pilkington added reviewers: rjmccall, pete, ahatanak.
Herald added subscribers: dexonsmith, jkorous.
`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`.
Fixes rdar://47610407
Thanks for taking a look!
Erik
Repository:
rC Clang
https://reviews.llvm.org/D57476
Files:
clang/lib/CodeGen/CGObjC.cpp
clang/test/CodeGenObjC/convert-messages-to-runtime-calls.m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57476.184373.patch
Type: text/x-patch
Size: 6106 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190130/5576b1bd/attachment-0001.bin>
More information about the cfe-commits
mailing list