diff options
author | Alex Lorenz <arphaman@gmail.com> | 2019-08-27 01:03:25 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2019-08-27 01:03:25 +0000 |
commit | 67d25fede9aa7be37b2dcd20e3402f3f190e41f9 (patch) | |
tree | 0169ec81b0d91d5982b84774f7c29f6ab5d12892 /clang/lib/Frontend | |
parent | 228ffac6786a8719bfb1d0452f49ee49b0a6fc28 (diff) | |
download | bcm5719-llvm-67d25fede9aa7be37b2dcd20e3402f3f190e41f9.tar.gz bcm5719-llvm-67d25fede9aa7be37b2dcd20e3402f3f190e41f9.zip |
Use FileEntryRef for PPCallbacks::FileSkipped
This fixes the issue where a filename dependendency was missing if the file that
was skipped was included through a symlink in an earlier run, if the file
manager was reused between runs.
llvm-svn: 369998
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r-- | clang/lib/Frontend/DependencyFile.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Frontend/Rewrite/InclusionRewriter.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Frontend/DependencyFile.cpp b/clang/lib/Frontend/DependencyFile.cpp index aeff571c145..86e9ccfe3a4 100644 --- a/clang/lib/Frontend/DependencyFile.cpp +++ b/clang/lib/Frontend/DependencyFile.cpp @@ -59,7 +59,7 @@ struct DepCollectorPPCallbacks : public PPCallbacks { /*IsModuleFile*/false, /*IsMissing*/false); } - void FileSkipped(const FileEntry &SkippedFile, const Token &FilenameTok, + void FileSkipped(const FileEntryRef &SkippedFile, const Token &FilenameTok, SrcMgr::CharacteristicKind FileType) override { StringRef Filename = llvm::sys::path::remove_leading_dotslash(SkippedFile.getName()); diff --git a/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp b/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp index f8388c50686..984b6386642 100644 --- a/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp +++ b/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp @@ -70,7 +70,7 @@ private: void FileChanged(SourceLocation Loc, FileChangeReason Reason, SrcMgr::CharacteristicKind FileType, FileID PrevFID) override; - void FileSkipped(const FileEntry &SkippedFile, const Token &FilenameTok, + void FileSkipped(const FileEntryRef &SkippedFile, const Token &FilenameTok, SrcMgr::CharacteristicKind FileType) override; void InclusionDirective(SourceLocation HashLoc, const Token &IncludeTok, StringRef FileName, bool IsAngled, @@ -169,8 +169,8 @@ void InclusionRewriter::FileChanged(SourceLocation Loc, /// Called whenever an inclusion is skipped due to canonical header protection /// macros. -void InclusionRewriter::FileSkipped(const FileEntry &/*SkippedFile*/, - const Token &/*FilenameTok*/, +void InclusionRewriter::FileSkipped(const FileEntryRef & /*SkippedFile*/, + const Token & /*FilenameTok*/, SrcMgr::CharacteristicKind /*FileType*/) { assert(LastInclusionLocation.isValid() && "A file, that wasn't found via an inclusion directive, was skipped"); |