summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/DiagnosticDriverKinds.td
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2016-12-06 16:33:22 +0000
committerJoerg Sonnenberger <joerg@bec.de>2016-12-06 16:33:22 +0000
commit0186633ab210334aeeb641d60fd420fcbb60294b (patch)
treeb4bbcf8f809fb358d412b6dc48dca1184e99b0e7 /include/clang/Basic/DiagnosticDriverKinds.td
parent9824d3b26d38ac5a44a386e44ab5300712d90189 (diff)
Allow clang to write compilation database records.
When integrating compilation database output into existing build systems, two approaches dominate so far. Ad-hoc implementation of the JSON output rules or using compiler wrappers. This patch adds a new option "-MJ foo.json" which gives a slightly cleaned up compilation record. The output is a fragment, i.e. you still need to add the array markers, but it allows multiple files to be easy merged. This way the only change in a build system is adding the option with potentially a per-target output file and merging the files with something like (echo '['; cat *.o.json; echo ']' > compilation_database.json or some additional filtering to remove the trailing comma for strict JSON compliance. Differential Revision: https://reviews.llvm.org/D27140 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticDriverKinds.td')
-rw-r--r--include/clang/Basic/DiagnosticDriverKinds.td2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticDriverKinds.td b/include/clang/Basic/DiagnosticDriverKinds.td
index fa98b392ac..0f35ff5dd1 100644
--- a/include/clang/Basic/DiagnosticDriverKinds.td
+++ b/include/clang/Basic/DiagnosticDriverKinds.td
@@ -87,6 +87,8 @@ def err_drv_clang_unsupported_opt_cxx_darwin_i386 : Error<
"the clang compiler does not support '%0' for C++ on Darwin/i386">;
def err_drv_command_failed : Error<
"%0 command failed with exit code %1 (use -v to see invocation)">;
+def err_drv_compilationdatabase : Error<
+ "compilation database '%0' could not be opened: %1">;
def err_drv_command_signalled : Error<
"%0 command failed due to signal (use -v to see invocation)">;
def err_drv_force_crash : Error<