Skip to content

Commit 21d39ba

Browse files
committed
use the new llvm::Optional API
fixes warnings in rebranch
1 parent 93dd07f commit 21d39ba

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

include/swift/Basic/LangOptions.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -632,14 +632,14 @@ namespace swift {
632632
/// contribute to a Swift Dependency Scanning hash.
633633
llvm::hash_code getModuleScanningHashComponents() const {
634634
auto hashValue = getPCHHashComponents();
635-
if (TargetVariant.hasValue())
636-
hashValue = llvm::hash_combine(hashValue, TargetVariant.getValue().str());
637-
if (ClangTarget.hasValue())
638-
hashValue = llvm::hash_combine(hashValue, ClangTarget.getValue().str());
639-
if (SDKVersion.hasValue())
640-
hashValue = llvm::hash_combine(hashValue, SDKVersion.getValue().getAsString());
641-
if (VariantSDKVersion.hasValue())
642-
hashValue = llvm::hash_combine(hashValue, VariantSDKVersion.getValue().getAsString());
635+
if (TargetVariant.has_value())
636+
hashValue = llvm::hash_combine(hashValue, TargetVariant.value().str());
637+
if (ClangTarget.has_value())
638+
hashValue = llvm::hash_combine(hashValue, ClangTarget.value().str());
639+
if (SDKVersion.has_value())
640+
hashValue = llvm::hash_combine(hashValue, SDKVersion.value().getAsString());
641+
if (VariantSDKVersion.has_value())
642+
hashValue = llvm::hash_combine(hashValue, VariantSDKVersion.value().getAsString());
643643
return hashValue;
644644
}
645645

0 commit comments

Comments
 (0)