aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@quicinc.com>2022-12-17 13:57:30 -0800
committerKrzysztof Parzyszek <kparzysz@quicinc.com>2022-12-17 15:24:14 -0800
commit8f0df9f3bbc6d7f3d5cbfd955c5ee4404c53a75d (patch)
treeb16c78031a5bff93437c00aba53b03bc6a166bc0 /clang/lib/Lex/Preprocessor.cpp
parent1d43966bc33a55cad1db7758bf4d82526d125db7 (diff)
downloadllvm-8f0df9f3bbc6d7f3d5cbfd955c5ee4404c53a75d.zip
llvm-8f0df9f3bbc6d7f3d5cbfd955c5ee4404c53a75d.tar.gz
llvm-8f0df9f3bbc6d7f3d5cbfd955c5ee4404c53a75d.tar.bz2
[clang] Convert OptionalFileEntryRefDegradesToFileEntryPtr to std::optional
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r--clang/lib/Lex/Preprocessor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index 281683b..b1cb81c 100644
--- a/clang/lib/Lex/Preprocessor.cpp
+++ b/clang/lib/Lex/Preprocessor.cpp
@@ -65,6 +65,7 @@
#include <algorithm>
#include <cassert>
#include <memory>
+#include <optional>
#include <string>
#include <utility>
#include <vector>
@@ -580,7 +581,7 @@ void Preprocessor::EnterMainSourceFile() {
if (!PPOpts->PCHThroughHeader.empty()) {
// Lookup and save the FileID for the through header. If it isn't found
// in the search path, it's a fatal error.
- Optional<FileEntryRef> File = LookupFile(
+ std::optional<FileEntryRef> File = LookupFile(
SourceLocation(), PPOpts->PCHThroughHeader,
/*isAngled=*/false, /*FromDir=*/nullptr, /*FromFile=*/nullptr,
/*CurDir=*/nullptr, /*SearchPath=*/nullptr, /*RelativePath=*/nullptr,