diff options
Diffstat (limited to 'gnu/llvm/clang/tools/libclang/Indexing.cpp')
-rw-r--r-- | gnu/llvm/clang/tools/libclang/Indexing.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gnu/llvm/clang/tools/libclang/Indexing.cpp b/gnu/llvm/clang/tools/libclang/Indexing.cpp index 0e83ec6ca79..24ca98d4de4 100644 --- a/gnu/llvm/clang/tools/libclang/Indexing.cpp +++ b/gnu/llvm/clang/tools/libclang/Indexing.cpp @@ -261,9 +261,9 @@ public: void InclusionDirective(SourceLocation HashLoc, const Token &IncludeTok, StringRef FileName, bool IsAngled, - CharSourceRange FilenameRange, const FileEntry *File, - StringRef SearchPath, StringRef RelativePath, - const Module *Imported, + CharSourceRange FilenameRange, + OptionalFileEntryRef File, StringRef SearchPath, + StringRef RelativePath, const Module *Imported, SrcMgr::CharacteristicKind FileType) override { bool isImport = (IncludeTok.is(tok::identifier) && IncludeTok.getIdentifierInfo()->getPPKeywordID() == tok::pp_import); @@ -508,8 +508,11 @@ static CXErrorCode clang_indexSourceFile_Impl( if (source_filename) Args->push_back(source_filename); + CreateInvocationOptions CIOpts; + CIOpts.Diags = Diags; + CIOpts.ProbePrecompiled = true; // FIXME: historical default. Needed? std::shared_ptr<CompilerInvocation> CInvok = - createInvocationFromCommandLine(*Args, Diags); + createInvocation(*Args, std::move(CIOpts)); if (!CInvok) return CXError_Failure; @@ -900,9 +903,8 @@ int clang_indexSourceFileFullArgv( result = clang_indexSourceFile_Impl( idxAction, client_data, index_callbacks, index_callbacks_size, index_options, source_filename, command_line_args, - num_command_line_args, - llvm::makeArrayRef(unsaved_files, num_unsaved_files), out_TU, - TU_options); + num_command_line_args, llvm::ArrayRef(unsaved_files, num_unsaved_files), + out_TU, TU_options); }; llvm::CrashRecoveryContext CRC; |