diff options
Diffstat (limited to 'clang/tools/libclang/CIndexer.cpp')
-rw-r--r-- | clang/tools/libclang/CIndexer.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/tools/libclang/CIndexer.cpp b/clang/tools/libclang/CIndexer.cpp index b7050162510..62ea8817206 100644 --- a/clang/tools/libclang/CIndexer.cpp +++ b/clang/tools/libclang/CIndexer.cpp @@ -93,6 +93,7 @@ StringRef CIndexer::getClangToolchainPath() { LibclangInvocationReporter::LibclangInvocationReporter( CIndexer &Idx, OperationKind Op, unsigned ParseOptions, llvm::ArrayRef<const char *> Args, + llvm::ArrayRef<std::string> InvocationArgs, llvm::ArrayRef<CXUnsavedFile> UnsavedFiles) { StringRef Path = Idx.getInvocationEmissionPath(); if (Path.empty()) @@ -127,6 +128,14 @@ LibclangInvocationReporter::LibclangInvocationReporter( OS << ','; OS << '"' << I.value() << '"'; } + if (!InvocationArgs.empty()) { + OS << R"(],"invocation-args":[)"; + for (const auto &I : llvm::enumerate(InvocationArgs)) { + if (I.index()) + OS << ','; + OS << '"' << I.value() << '"'; + } + } if (!UnsavedFiles.empty()) { OS << R"(],"unsaved_file_hashes":[)"; for (const auto &UF : llvm::enumerate(UnsavedFiles)) { |