mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Update hasGuaranteedResult and hasGuaranteedAddressResult
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user