diff options
author | Duncan Sands <baldrick@free.fr> | 2007-12-10 19:09:40 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2007-12-10 19:09:40 +0000 |
commit | cbb8badce8838ece47cb806a0399c77d76a7e11b (patch) | |
tree | 778a2f778908ed6a3d1f6aee778559a87954d383 /include/llvm/Function.h | |
parent | 1eff70451fbb079c1d5b8f45ff8c8a2b8f74d7ba (diff) |
Make PruneEH update the nounwind/noreturn attributes
on functions as it calculates them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44802 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Function.h')
-rw-r--r-- | include/llvm/Function.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h index ece095d380..2abde45f8b 100644 --- a/include/llvm/Function.h +++ b/include/llvm/Function.h @@ -165,6 +165,16 @@ public: return ParamAttrs && ParamAttrs->paramHasAttr(i, attr); } + /// @brief Determine if the function cannot return. + bool isNoReturn() const { + return paramHasAttr(0, ParamAttr::NoReturn); + } + + /// @brief Determine if the function cannot unwind. + bool isNoUnwind() const { + return paramHasAttr(0, ParamAttr::NoUnwind); + } + /// @brief Determine if the function does not access memory. bool doesNotAccessMemory() const { return paramHasAttr(0, ParamAttr::ReadNone); |