diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2023-05-31 14:53:11 -0700 |
---|---|---|
committer | Jan Svoboda <jan_svoboda@apple.com> | 2023-06-15 12:34:54 +0200 |
commit | fa5788ff8dc10f36e0947757e335cd180a1a63c9 (patch) | |
tree | fbf8546f17263e3655ed5bc9310f1385daa0b5f1 /clang/lib/Frontend/ASTUnit.cpp | |
parent | ed27d28f9a53d689c98a3bef26980e2858350548 (diff) | |
download | llvm-fa5788ff8dc10f36e0947757e335cd180a1a63c9.zip llvm-fa5788ff8dc10f36e0947757e335cd180a1a63c9.tar.gz llvm-fa5788ff8dc10f36e0947757e335cd180a1a63c9.tar.bz2 |
[clang][index] NFCI: Make `CXFile` a `FileEntryRef`
This patch swaps out the `void *` behind `CXFile` from `FileEntry *` to `FileEntryRef::MapEntry *`. This allows us to remove some deprecated uses of `FileEntry::getName()`.
Depends on D151854.
Reviewed By: benlangmuir
Differential Revision: https://reviews.llvm.org/D151938
Diffstat (limited to 'clang/lib/Frontend/ASTUnit.cpp')
-rw-r--r-- | clang/lib/Frontend/ASTUnit.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp index 32ae76d..a42df66 100644 --- a/clang/lib/Frontend/ASTUnit.cpp +++ b/clang/lib/Frontend/ASTUnit.cpp @@ -2645,9 +2645,9 @@ bool ASTUnit::visitLocalTopLevelDecls(void *context, DeclVisitorFn Fn) { return true; } -const FileEntry *ASTUnit::getPCHFile() { +OptionalFileEntryRef ASTUnit::getPCHFile() { if (!Reader) - return nullptr; + return std::nullopt; serialization::ModuleFile *Mod = nullptr; Reader->getModuleManager().visit([&Mod](serialization::ModuleFile &M) { @@ -2670,7 +2670,7 @@ const FileEntry *ASTUnit::getPCHFile() { if (Mod) return Mod->File; - return nullptr; + return std::nullopt; } bool ASTUnit::isModuleFile() const { |