mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
use new llvm::Optional API
`getValue` -> `value` `getValueOr` -> `value_or` `hasValue` -> `has_value` `map` -> `transform` The old API will be deprecated in the rebranch. To avoid merge conflicts, use the new API already in the main branch. rdar://102362022
This commit is contained in:
@@ -103,11 +103,11 @@ public:
|
||||
// If we have a modify, check if our value is /ever/ written to. If it is
|
||||
// never actually written to, then we convert to a load_borrow.
|
||||
auto result = ctx.addressToExhaustiveWriteListCache.get(access);
|
||||
if (!result.hasValue()) {
|
||||
if (!result.has_value()) {
|
||||
return answer(true);
|
||||
}
|
||||
|
||||
if (result.getValue().empty()) {
|
||||
if (result.value().empty()) {
|
||||
return answer(false);
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
if (!arg->isIndirectResult() &&
|
||||
arg->getKnownParameterInfo().isIndirectMutating()) {
|
||||
auto wellBehavedWrites = ctx.addressToExhaustiveWriteListCache.get(arg);
|
||||
if (!wellBehavedWrites.hasValue()) {
|
||||
if (!wellBehavedWrites.has_value()) {
|
||||
return answer(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user