From 399aea300f220ee3715cb22b32ac90bb57eca30d Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Thu, 1 Dec 2016 23:37:45 +0000 Subject: Extend CompilationDatabase by a field for the output filename In bigger projects like an Operating System, the same source code is often compiled in slightly different ways. This could be the difference between PIC and non-PIC code for static vs dynamic libraries, it could also be the difference between size optimised versions of tools for ramdisk images. At the moment, the compilation database has no way to distinguish such cases. As first step, add a field in the JSON format for it and process it accordingly. Differential Revision: https://reviews.llvm.org/D27138 llvm-svn: 288436 --- clang/lib/Tooling/CompilationDatabase.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Tooling/CompilationDatabase.cpp') diff --git a/clang/lib/Tooling/CompilationDatabase.cpp b/clang/lib/Tooling/CompilationDatabase.cpp index 01f62616fb0..8ca0b2df701 100644 --- a/clang/lib/Tooling/CompilationDatabase.cpp +++ b/clang/lib/Tooling/CompilationDatabase.cpp @@ -300,7 +300,8 @@ FixedCompilationDatabase(Twine Directory, ArrayRef CommandLine) { ToolCommandLine.insert(ToolCommandLine.end(), CommandLine.begin(), CommandLine.end()); CompileCommands.emplace_back(Directory, StringRef(), - std::move(ToolCommandLine)); + std::move(ToolCommandLine), + StringRef()); } std::vector -- cgit v1.2.3