Commit 7445891 1 parent 790daca commit 7445891 Copy full SHA for 7445891
File tree 2 files changed +18
-2
lines changed
2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -1096,10 +1096,18 @@ class IndexPPCallbacks : public PPCallbacks {
1096
1096
}
1097
1097
void InclusionDirective (SourceLocation hashLoc, const Token &tok,
1098
1098
StringRef included, bool isAngled,
1099
- CharSourceRange filenameRange, const FileEntry *file,
1099
+ CharSourceRange filenameRange,
1100
+ #if LLVM_VERSION_MAJOR >= 15 // llvmorg-15-init-7692-gd79ad2f1dbc2
1101
+ llvm::Optional<FileEntryRef> fileRef,
1102
+ #else
1103
+ const FileEntry *file,
1104
+ #endif
1100
1105
StringRef searchPath, StringRef relativePath,
1101
1106
const Module *imported,
1102
1107
SrcMgr::CharacteristicKind fileType) override {
1108
+ #if LLVM_VERSION_MAJOR >= 15 // llvmorg-15-init-7692-gd79ad2f1dbc2
1109
+ const FileEntry *file = fileRef ? &fileRef->getFileEntry () : nullptr ;
1110
+ #endif
1103
1111
if (!file)
1104
1112
return ;
1105
1113
auto spell = fromCharSourceRange (sm, param.ctx ->getLangOpts (),
Original file line number Diff line number Diff line change @@ -178,11 +178,19 @@ class StoreInclude : public PPCallbacks {
178
178
: sm(sm), out(out) {}
179
179
void InclusionDirective (SourceLocation hashLoc, const Token &includeTok,
180
180
StringRef fileName, bool isAngled,
181
- CharSourceRange filenameRange, const FileEntry *file,
181
+ CharSourceRange filenameRange,
182
+ #if LLVM_VERSION_MAJOR >= 15 // llvmorg-15-init-7692-gd79ad2f1dbc2
183
+ llvm::Optional<FileEntryRef> fileRef,
184
+ #else
185
+ const FileEntry *file,
186
+ #endif
182
187
StringRef searchPath, StringRef relativePath,
183
188
const clang::Module *imported,
184
189
SrcMgr::CharacteristicKind fileKind) override {
185
190
(void )sm;
191
+ #if LLVM_VERSION_MAJOR >= 15 // llvmorg-15-init-7692-gd79ad2f1dbc2
192
+ const FileEntry *file = fileRef ? &fileRef->getFileEntry () : nullptr ;
193
+ #endif
186
194
if (file && seen.insert (file).second )
187
195
out.emplace_back (pathFromFileEntry (*file), file->getModificationTime ());
188
196
}
You can’t perform that action at this time.
0 commit comments