diff options
Diffstat (limited to 'include/llvm/Function.h')
-rw-r--r-- | include/llvm/Function.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h index b34a6b2..9319a5b 100644 --- a/include/llvm/Function.h +++ b/include/llvm/Function.h @@ -253,6 +253,22 @@ public: else removeFnAttr(Attribute::NoUnwind); } + /// @brief True if the ABI mandates this function be in a unwind table. + bool hasUWTable() const { + return hasFnAttr(Attribute::UWTable); + } + void setHasUWTable(bool HasUWTable = true) { + if (HasUWTable) + addFnAttr(Attribute::UWTable); + else + removeFnAttr(Attribute::UWTable); + } + + /// @brief True if this function needs in a unwind table. + bool needsUnwindTableEntry() const { + return hasUWTable() || !doesNotThrow(); + } + /// @brief Determine if the function returns a structure through first /// pointer argument. bool hasStructRetAttr() const { |