diff options
author | Krzysztof Parzyszek <kparzysz@quicinc.com> | 2022-12-17 13:57:30 -0800 |
---|---|---|
committer | Krzysztof Parzyszek <kparzysz@quicinc.com> | 2022-12-17 15:24:14 -0800 |
commit | 8f0df9f3bbc6d7f3d5cbfd955c5ee4404c53a75d (patch) | |
tree | b16c78031a5bff93437c00aba53b03bc6a166bc0 /clang/lib/Frontend/DependencyFile.cpp | |
parent | 1d43966bc33a55cad1db7758bf4d82526d125db7 (diff) | |
download | llvm-8f0df9f3bbc6d7f3d5cbfd955c5ee4404c53a75d.zip llvm-8f0df9f3bbc6d7f3d5cbfd955c5ee4404c53a75d.tar.gz llvm-8f0df9f3bbc6d7f3d5cbfd955c5ee4404c53a75d.tar.bz2 |
[clang] Convert OptionalFileEntryRefDegradesToFileEntryPtr to std::optional
Diffstat (limited to 'clang/lib/Frontend/DependencyFile.cpp')
-rw-r--r-- | clang/lib/Frontend/DependencyFile.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/Frontend/DependencyFile.cpp b/clang/lib/Frontend/DependencyFile.cpp index 8d712a2..500c08c 100644 --- a/clang/lib/Frontend/DependencyFile.cpp +++ b/clang/lib/Frontend/DependencyFile.cpp @@ -10,11 +10,11 @@ // //===----------------------------------------------------------------------===// -#include "clang/Frontend/Utils.h" #include "clang/Basic/FileManager.h" #include "clang/Basic/SourceManager.h" #include "clang/Frontend/DependencyOutputOptions.h" #include "clang/Frontend/FrontendDiagnostic.h" +#include "clang/Frontend/Utils.h" #include "clang/Lex/DirectoryLookup.h" #include "clang/Lex/ModuleMap.h" #include "clang/Lex/PPCallbacks.h" @@ -24,6 +24,7 @@ #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" +#include <optional> using namespace clang; @@ -64,8 +65,9 @@ struct DepCollectorPPCallbacks : public PPCallbacks { void InclusionDirective(SourceLocation HashLoc, const Token &IncludeTok, StringRef FileName, bool IsAngled, CharSourceRange FilenameRange, - Optional<FileEntryRef> File, StringRef SearchPath, - StringRef RelativePath, const Module *Imported, + std::optional<FileEntryRef> File, + StringRef SearchPath, StringRef RelativePath, + const Module *Imported, SrcMgr::CharacteristicKind FileType) override { if (!File) DepCollector.maybeAddDependency(FileName, /*FromModule*/false, @@ -75,7 +77,7 @@ struct DepCollectorPPCallbacks : public PPCallbacks { } void HasInclude(SourceLocation Loc, StringRef SpelledFilename, bool IsAngled, - Optional<FileEntryRef> File, + std::optional<FileEntryRef> File, SrcMgr::CharacteristicKind FileType) override { if (!File) return; |