diff options
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); |