Skip to content

Commit 2e4809a

Browse files
authored
Update Function.h
1 parent ff59b7a commit 2e4809a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

llvm/include/llvm/IR/Function.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,15 @@ class LLVM_EXTERNAL_VISIBILITY Function : public GlobalObject,
255255
: removeFnAttr("no-stack-arg-probe");
256256
}
257257

258+
/// Indicate that whether we should disable the try statements.
259+
bool doesDisableTryStmt() const {
260+
return hasFnAttribute("no-try-stmt");
261+
}
262+
void setDoesDisableTryStmt(bool Disabled = true) {
263+
Disabled ? addFnAttr("no-try-stmt")
264+
: removeFnAttr("no-try-stmt");
265+
}
266+
258267
/// Is SEHFilterFunction?
259268
bool isSEHFilterFunction() const {
260269
return hasFnAttribute(Attribute::IsSEHFilterFunction);

0 commit comments

Comments
 (0)