]> granicus.if.org Git - clang/commit
Recommit r329442: Generate Libclang invocation reproducers using a new
authorAlex Lorenz <arphaman@gmail.com>
Sat, 7 Apr 2018 00:03:27 +0000 (00:03 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Sat, 7 Apr 2018 00:03:27 +0000 (00:03 +0000)
commitc474646055b57e8a94ccb6c53ec241a4c10956b9
tree3189a8af004bd6a9e54040149004ff0caf6ecea6
parentd69715d7e443583771b8427e6a015233e3525227
Recommit r329442: Generate Libclang invocation reproducers using a new
-cc1gen-reproducer driver option

The recommit fixes:
- An MSAN failure (CCPrintOptions wasn't initialized in the Driver)
- Ensures that the strings in the libclang invocation files are escaped

Original message:

This commit is a follow up to the previous work that recorded Libclang invocations
into temporary files: r319702.

It adds a new -cc1 mode to clang: -cc1gen-reproducer. The goal of this mode is to generate
Clang reproducer files for Libclang tool invocation. The JSON format in the invocation
files is not really intended to be stable, so Libclang and Clang should be of the same version
when generating reproducers.
The new mode emits the information about the temporary files and Libclang-specific information
to stdout using JSON.

rdar://35322614

Differential Revision: https://reviews.llvm.org/D40983

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329465 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Driver/Driver.h
lib/Driver/Driver.cpp
test/Index/create-libclang-completion-reproducer.c [new file with mode: 0644]
test/Index/create-libclang-parsing-reproducer.c [new file with mode: 0644]
tools/driver/CMakeLists.txt
tools/driver/cc1gen_reproducer_main.cpp [new file with mode: 0644]
tools/driver/driver.cpp
tools/libclang/CIndexer.cpp