Skip to content

Commit 5e3ff1e

Browse files
committed
[NFC] Add hasGuaranteedResult api
1 parent 36f2955 commit 5e3ff1e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/swift/AST/Types.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5410,6 +5410,13 @@ class SILFunctionType final
54105410
return hasErrorResult() && getErrorResult().isFormalIndirect();
54115411
}
54125412

5413+
bool hasGuaranteedResult() const {
5414+
if (getNumResults() != 1) {
5415+
return false;
5416+
}
5417+
return getResults()[0].isGuaranteedResult();
5418+
}
5419+
54135420
bool hasGuaranteedAddressResult() const {
54145421
if (getNumResults() != 1) {
54155422
return false;

0 commit comments

Comments
 (0)