diff options
author | dim <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
commit | 952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch) | |
tree | df8df0b0067b381eab470a3b8f28d14a552a6340 /include/clang/Tooling/CompilationDatabase.h | |
parent | ea266cad53e3d49771fa38103913d3ec7a166694 (diff) | |
download | FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz |
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
Diffstat (limited to 'include/clang/Tooling/CompilationDatabase.h')
-rw-r--r-- | include/clang/Tooling/CompilationDatabase.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/clang/Tooling/CompilationDatabase.h b/include/clang/Tooling/CompilationDatabase.h index 7a8054f..8cca329 100644 --- a/include/clang/Tooling/CompilationDatabase.h +++ b/include/clang/Tooling/CompilationDatabase.h @@ -50,6 +50,16 @@ struct CompileCommand { /// \brief The command line that was executed. std::vector<std::string> CommandLine; + + /// \brief An optional mapping from each file's path to its content for all + /// files needed for the compilation that are not available via the file + /// system. + /// + /// Note that a tool implementation is required to fall back to the file + /// system if a source file is not provided in the mapped sources, as + /// compilation databases will usually not provide all files in mapped sources + /// for performance reasons. + std::vector<std::pair<std::string, std::string> > MappedSources; }; /// \brief Interface for compilation databases. @@ -108,6 +118,10 @@ public: /// \brief Returns all compile commands for all the files in the compilation /// database. + /// + /// FIXME: Add a layer in Tooling that provides an interface to run a tool + /// over all files in a compilation database. Not all build systems have the + /// ability to provide a feasible implementation for \c getAllCompileCommands. virtual std::vector<CompileCommand> getAllCompileCommands() const = 0; }; |