我的目标是确定LLVM函数的所有可能的退出点。我知道
terminator instructions
结束基本块,以退出函数或分支到同一函数的另一部分。在《终结者》的指令中,我对大多数指令都很清楚:
-
ret
和
resume
退出函数
-
br
,
switch
indirectbr
-
invoke
catchswitch
相关的异常控制流,也不应该退出函数
-
(
unreachable
可忽略)
我想澄清一下
catchret
和
cleanupret
. 我已经编译好了
example exception handling code
clang++