]> granicus.if.org Git - clang/commit
Generate Libclang invocation reproducers using a new -cc1gen-reproducer
authorAlex Lorenz <arphaman@gmail.com>
Fri, 6 Apr 2018 18:30:14 +0000 (18:30 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Fri, 6 Apr 2018 18:30:14 +0000 (18:30 +0000)
commit2cc079adddc5e6a8118534d369a26119606af7cb
treee567722bfd8554554dfdc5c278fc6d311fa6a661
parent7c95be23cfc5ad2ad525979fe1c5bb60a5223759
Generate Libclang invocation reproducers using a new -cc1gen-reproducer
driver option

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@329442 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