Author: Jan Svoboda Date: 2023-09-20T18:41:25-07:00 New Revision: 3de1e30c9a59c0c2f7d498488532e1e324059082
URL: https://github.com/llvm/llvm-project/commit/3de1e30c9a59c0c2f7d498488532e1e324059082 DIFF: https://github.com/llvm/llvm-project/commit/3de1e30c9a59c0c2f7d498488532e1e324059082.diff LOG: [clang] NFCI: Use `FileEntryRef` in `SymbolCollector` Added: Modified: clang-tools-extra/clangd/index/SymbolCollector.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clangd/index/SymbolCollector.cpp b/clang-tools-extra/clangd/index/SymbolCollector.cpp index 8fe1146bc2752c3..74aca9b99c8a584 100644 --- a/clang-tools-extra/clangd/index/SymbolCollector.cpp +++ b/clang-tools-extra/clangd/index/SymbolCollector.cpp @@ -363,14 +363,15 @@ class SymbolCollector::HeaderFileURICache { // named `Framework`, e.g. `NSObject.h` in framework `Foundation` would // give <Foundation/Foundation.h> if the umbrella header exists, otherwise // <Foundation/NSObject.h>. - std::optional<llvm::StringRef> getFrameworkHeaderIncludeSpelling( - const FileEntry *FE, llvm::StringRef Framework, HeaderSearch &HS) { - auto Res = CachePathToFrameworkSpelling.try_emplace(FE->getName()); + std::optional<llvm::StringRef> + getFrameworkHeaderIncludeSpelling(FileEntryRef FE, llvm::StringRef Framework, + HeaderSearch &HS) { + auto Res = CachePathToFrameworkSpelling.try_emplace(FE.getName()); auto *CachedHeaderSpelling = &Res.first->second; if (!Res.second) return llvm::StringRef(*CachedHeaderSpelling); - auto HeaderPath = splitFrameworkHeaderPath(FE->getName()); + auto HeaderPath = splitFrameworkHeaderPath(FE.getName()); if (!HeaderPath) { // Unexpected: must not be a proper framework header, don't cache the // failure. _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits