Don't use Optional::hasValue (NFC)

This commit is contained in:
Kazu Hirata
2022-06-25 11:55:57 -07:00
parent b8df4093e4
commit aa8feeefd3
372 changed files with 2096 additions and 2178 deletions

View File

@@ -31,14 +31,14 @@ namespace {
/// at position \p Key.
void serializeObject(Object &Paren, StringRef Key, Optional<Object> Obj) {
if (Obj)
Paren[Key] = std::move(Obj.getValue());
Paren[Key] = std::move(*Obj);
}
/// Helper function to inject a JSON array \p Array into object \p Paren at
/// position \p Key.
void serializeArray(Object &Paren, StringRef Key, Optional<Array> Array) {
if (Array)
Paren[Key] = std::move(Array.getValue());
Paren[Key] = std::move(*Array);
}
/// Serialize a \c VersionTuple \p V with the Symbol Graph semantic version