Dávid Bolvanský via llvm-dev
2018-May-16 17:28 UTC
[llvm-dev] Detect exception throwing in basic blocks
Hello, For code: try { throw 42; } catch(int e){} Are there any helpers in LLVM API to give me info that in "try block" there is a throw which will be executed? I am interested in info "yes, this block throws". Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180516/6f938b93/attachment.html>
Reid Kleckner via llvm-dev
2018-May-16 17:45 UTC
[llvm-dev] Detect exception throwing in basic blocks
In LLVM IR, you would see an `invoke` instruction that calls the appropriate C++ runtime function to set up a C++ exception. It would be __cxa_throw or CxxThrowException on Windows. Since only function calls can throw, this is not a property of the basic block, but a property of individual call instructions. On Wed, May 16, 2018 at 10:28 AM Dávid Bolvanský via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hello, > > For code: > try { > throw 42; > } catch(int e){} > > Are there any helpers in LLVM API to give me info that in "try block" > there is a throw which will be executed? I am interested in info "yes, this > block throws". > > Thank you > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180516/c34e740b/attachment.html>