<div dir="ltr"><div>@@ -179,11 +185,13 @@ public:</div><div>   /// \param Directory The base directory used in the FixedCompilationDatabase.</div><div>   static FixedCompilationDatabase *loadFromCommandLine(int &Argc,</div><div>                                                        const char *const *Argv,</div><div>-                                                       Twine Directory = ".");</div><div>+                                                       Twine Directory = ".",</div><div>+                                                       Twine File = Twine());</div><div> </div><div>A fixed compilation database returns the same command lines for all files, thus having a file in the function seems strange.</div><div><br></div><div>What exactly is the use case? So far, the compilation database has been designed for 2 use cases:</div><div>1. for a file, get the compile commands; the user already knows the file, no need to get the file</div><div>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.</div><div><br></div><div>Thoughts?</div><div>/Manuel</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 9, 2015 at 9:36 PM Argyrios Kyrtzidis <<a href="mailto:kyrtzidis@apple.com">kyrtzidis@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
The attached patch exposes the ‘file’ entry in a compilation database command, via the CompileCommand structure.<br>
<br>
</blockquote></div>