@@ -179,11 +185,13 @@ public:
   /// \param Directory The base directory used in the
FixedCompilationDatabase.
   static FixedCompilationDatabase *loadFromCommandLine(int &Argc,
                                                        const char *const
*Argv,
-                                                       Twine Directory =
".");
+                                                       Twine Directory =
".",
+                                                       Twine File =
Twine());
A fixed compilation database returns the same command lines for all files,
thus having a file in the function seems strange.

What exactly is the use case? So far, the compilation database has been
designed for 2 use cases:
1. for a file, get the compile commands; the user already knows the file,
no need to get the file
2. get all compile commands; for that, we have the getAllFiles() method, so
a user can get all known files (for compilation databases that support
that), and then get the compile command line.

Thoughts?
/Manuel

On Wed, Sep 9, 2015 at 9:36 PM Argyrios Kyrtzidis <kyrtzi...@apple.com>
wrote:

> Hi,
>
> The attached patch exposes the ‘file’ entry in a compilation database
> command, via the CompileCommand structure.
>
>
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to