mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-21 23:25:07 +00:00
Adapt llvmorg-15-init-7692-gd79ad2f1dbc2: PPCallbacks::InclusionDirective parameter
This commit is contained in:
parent
790daca4b2
commit
74458915b3
@ -1096,10 +1096,18 @@ public:
|
||||
}
|
||||
void InclusionDirective(SourceLocation hashLoc, const Token &tok,
|
||||
StringRef included, bool isAngled,
|
||||
CharSourceRange filenameRange, const FileEntry *file,
|
||||
CharSourceRange filenameRange,
|
||||
#if LLVM_VERSION_MAJOR >= 15 // llvmorg-15-init-7692-gd79ad2f1dbc2
|
||||
llvm::Optional<FileEntryRef> fileRef,
|
||||
#else
|
||||
const FileEntry *file,
|
||||
#endif
|
||||
StringRef searchPath, StringRef relativePath,
|
||||
const Module *imported,
|
||||
SrcMgr::CharacteristicKind fileType) override {
|
||||
#if LLVM_VERSION_MAJOR >= 15 // llvmorg-15-init-7692-gd79ad2f1dbc2
|
||||
const FileEntry *file = fileRef ? &fileRef->getFileEntry() : nullptr;
|
||||
#endif
|
||||
if (!file)
|
||||
return;
|
||||
auto spell = fromCharSourceRange(sm, param.ctx->getLangOpts(),
|
||||
|
@ -178,11 +178,19 @@ public:
|
||||
: sm(sm), out(out) {}
|
||||
void InclusionDirective(SourceLocation hashLoc, const Token &includeTok,
|
||||
StringRef fileName, bool isAngled,
|
||||
CharSourceRange filenameRange, const FileEntry *file,
|
||||
CharSourceRange filenameRange,
|
||||
#if LLVM_VERSION_MAJOR >= 15 // llvmorg-15-init-7692-gd79ad2f1dbc2
|
||||
llvm::Optional<FileEntryRef> fileRef,
|
||||
#else
|
||||
const FileEntry *file,
|
||||
#endif
|
||||
StringRef searchPath, StringRef relativePath,
|
||||
const clang::Module *imported,
|
||||
SrcMgr::CharacteristicKind fileKind) override {
|
||||
(void)sm;
|
||||
#if LLVM_VERSION_MAJOR >= 15 // llvmorg-15-init-7692-gd79ad2f1dbc2
|
||||
const FileEntry *file = fileRef ? &fileRef->getFileEntry() : nullptr;
|
||||
#endif
|
||||
if (file && seen.insert(file).second)
|
||||
out.emplace_back(pathFromFileEntry(*file), file->getModificationTime());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user