diff options
Diffstat (limited to 'clang-tools-extra')
-rw-r--r-- | clang-tools-extra/clangd/ClangdUnit.cpp | 4 | ||||
-rw-r--r-- | clang-tools-extra/pp-trace/PPCallbacksTracker.cpp | 4 | ||||
-rw-r--r-- | clang-tools-extra/pp-trace/PPCallbacksTracker.h | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/clang-tools-extra/clangd/ClangdUnit.cpp b/clang-tools-extra/clangd/ClangdUnit.cpp index 82ca7eda2e4..f85cac200da 100644 --- a/clang-tools-extra/clangd/ClangdUnit.cpp +++ b/clang-tools-extra/clangd/ClangdUnit.cpp @@ -268,7 +268,9 @@ private: FilenameTok.getEndLoc()), File, "SearchPath", "RelPath", /*Imported=*/nullptr, Inc.FileKind); if (File) - Delegate->FileSkipped(*File, FilenameTok, Inc.FileKind); + // FIXME: Use correctly named FileEntryRef. + Delegate->FileSkipped(FileEntryRef(File->getName(), *File), FilenameTok, + Inc.FileKind); else { llvm::SmallString<1> UnusedRecovery; Delegate->FileNotFound(WrittenFilename, UnusedRecovery); diff --git a/clang-tools-extra/pp-trace/PPCallbacksTracker.cpp b/clang-tools-extra/pp-trace/PPCallbacksTracker.cpp index 4b8a658b438..6000dcb3a87 100644 --- a/clang-tools-extra/pp-trace/PPCallbacksTracker.cpp +++ b/clang-tools-extra/pp-trace/PPCallbacksTracker.cpp @@ -112,11 +112,11 @@ void PPCallbacksTracker::FileChanged(SourceLocation Loc, // Callback invoked whenever a source file is skipped as the result // of header guard optimization. -void PPCallbacksTracker::FileSkipped(const FileEntry &SkippedFile, +void PPCallbacksTracker::FileSkipped(const FileEntryRef &SkippedFile, const Token &FilenameTok, SrcMgr::CharacteristicKind FileType) { beginCallback("FileSkipped"); - appendArgument("ParentFile", &SkippedFile); + appendArgument("ParentFile", &SkippedFile.getFileEntry()); appendArgument("FilenameTok", FilenameTok); appendArgument("FileType", FileType, CharacteristicKindStrings); } diff --git a/clang-tools-extra/pp-trace/PPCallbacksTracker.h b/clang-tools-extra/pp-trace/PPCallbacksTracker.h index 726a393a1be..da5d1b68889 100644 --- a/clang-tools-extra/pp-trace/PPCallbacksTracker.h +++ b/clang-tools-extra/pp-trace/PPCallbacksTracker.h @@ -89,7 +89,7 @@ public: void FileChanged(SourceLocation Loc, PPCallbacks::FileChangeReason Reason, SrcMgr::CharacteristicKind FileType, FileID PrevFID = FileID()) override; - void FileSkipped(const FileEntry &SkippedFile, const Token &FilenameTok, + void FileSkipped(const FileEntryRef &SkippedFile, const Token &FilenameTok, SrcMgr::CharacteristicKind FileType) override; bool FileNotFound(llvm::StringRef FileName, llvm::SmallVectorImpl<char> &RecoveryPath) override; |