mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Update hasGuaranteedResult and hasGuaranteedAddressResult
This commit is contained in:
@@ -5397,13 +5397,12 @@ public:
|
||||
}
|
||||
|
||||
bool hasGuaranteedAddressResult() const {
|
||||
for (auto &result : getResults()) {
|
||||
if (result.isGuaranteedAddressResult()) {
|
||||
return true;
|
||||
}
|
||||
if (getNumResults() != 1) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
return getResults()[0].isGuaranteedAddressResult();
|
||||
}
|
||||
|
||||
struct IndirectFormalResultFilter {
|
||||
bool operator()(SILResultInfo result) const {
|
||||
return result.isFormalIndirect();
|
||||
|
||||
@@ -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