Update hasGuaranteedResult and hasGuaranteedAddressResult

This commit is contained in:
Meghana Gupta
2025-09-09 11:26:38 -07:00
parent 6665cd5d46
commit 995d6a77d9
2 changed files with 12 additions and 15 deletions

View File

@@ -299,21 +299,19 @@ public:
}
bool hasGuaranteedResult() const {
for (auto result : funcTy->getResults()) {
if (result.getConvention() == ResultConvention::Guaranteed) {
return true;
}
if (funcTy->getNumResults() != 1) {
return false;
}
return false;
return funcTy->getResults()[0].getConvention() ==
ResultConvention::Guaranteed;
}
bool hasGuaranteedAddressResult() const {
for (auto result : funcTy->getResults()) {
if (result.getConvention() == ResultConvention::GuaranteedAddress) {
return true;
}
if (funcTy->getNumResults() != 1) {
return false;
}
return false;
return funcTy->getResults()[0].getConvention() ==
ResultConvention::GuaranteedAddress;
}
struct SILResultTypeFunc;