change to the new llvm::Optional APIs

This is a follow-up of https://github.com/apple/swift/pull/62217
This commit is contained in:
Erik Eckstein
2023-01-25 09:18:36 +01:00
parent c285bab8a0
commit 7d8bf37e5e
15 changed files with 59 additions and 59 deletions

View File

@@ -693,7 +693,7 @@ public:
bool isDef(SILInstruction *inst, TypeTreeLeafTypeRange span) const {
return inst == defInst.first &&
defInst.second->setIntersection(span).hasValue();
defInst.second->setIntersection(span).has_value();
}
bool isDefBlock(SILBasicBlock *block, unsigned bit) const {
@@ -764,7 +764,7 @@ public:
if (!iter)
return false;
return llvm::any_of(*iter, [&](TypeTreeLeafTypeRange storedSpan) {
return span.setIntersection(storedSpan).hasValue();
return span.setIntersection(storedSpan).has_value();
});
}
@@ -789,7 +789,7 @@ public:
if (!iter)
return false;
return llvm::any_of(*iter, [&](TypeTreeLeafTypeRange storedSpan) {
return span.setIntersection(storedSpan).hasValue();
return span.setIntersection(storedSpan).has_value();
});
}
@@ -798,7 +798,7 @@ public:
if (!iter)
return false;
return llvm::any_of(*iter, [&](TypeTreeLeafTypeRange storedSpan) {
return span.setIntersection(storedSpan).hasValue();
return span.setIntersection(storedSpan).has_value();
});
}