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/Lex/ModuleMap.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/Lex/ModuleMap.cpp')
-rw-r--r-- | clang/lib/Lex/ModuleMap.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp index f5a7f51..c061790 100644 --- a/clang/lib/Lex/ModuleMap.cpp +++ b/clang/lib/Lex/ModuleMap.cpp @@ -46,6 +46,7 @@ #include <cassert> #include <cstdint> #include <cstring> +#include <optional> #include <string> #include <system_error> #include <utility> @@ -1258,7 +1259,7 @@ void ModuleMap::addHeader(Module *Mod, Module::Header Header, Cb->moduleMapAddHeader(Header.Entry->getName()); } -Optional<FileEntryRef> +std::optional<FileEntryRef> ModuleMap::getContainingModuleMapFile(const Module *Module) const { if (Module->DefinitionLoc.isInvalid()) return std::nullopt; @@ -1267,7 +1268,7 @@ ModuleMap::getContainingModuleMapFile(const Module *Module) const { SourceMgr.getFileID(Module->DefinitionLoc)); } -Optional<FileEntryRef> +std::optional<FileEntryRef> ModuleMap::getModuleMapFileForUniquing(const Module *M) const { if (M->IsInferred) { assert(InferredModuleAllowedBy.count(M) && "missing inferred module map"); |