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

@@ -27,7 +27,7 @@ forEachDependencyUntilTrue(CompilerInstance &CI,
llvm::function_ref<bool(StringRef)> callback) {
// Check files in the current module. If 'excludeBufferID' is None, exclude
// all source files.
if (excludeBufferID.hasValue()) {
if (excludeBufferID.has_value()) {
for (FileUnit *file : CI.getMainModule()->getFiles()) {
StringRef filename;
if (auto SF = dyn_cast<SourceFile>(file)) {