Allow tools to work without compilation database
Manuel Klimek via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 3 02:42:11 PST 2015
Applied your patch, modified it a bit, and submitted r254599. Thanks!
On Thu, Dec 3, 2015 at 11:15 AM Russell Wallace <russell.wallace at gmail.com>
wrote:
> Okay - I don't understand how the class works well enough to be certain
> that will do the same thing, but if you do, I've no problem taking your
> word for it. Should I resend the patch with that change?
>
> On Thu, Dec 3, 2015 at 9:56 AM, Manuel Klimek <klimek at google.com> wrote:
>
>> - if (!Compilations)
>> - llvm::report_fatal_error(ErrorMessage);
>> + if (!Compilations) {
>> + errs() << "Compilation database not found - using default options\n";
>> + int argc = 1;
>> + const char *argv[] = {"--"};
>> + Compilations.reset(
>> + FixedCompilationDatabase::loadFromCommandLine(argc, argv));
>>
>>
>> Just Compilations.reset(new FixedCompilationDatabase(".",
>> std::vector<std::string>()))?
>>
>> On Thu, Dec 3, 2015 at 8:51 AM Russell Wallace via cfe-commits <
>> cfe-commits at lists.llvm.org> wrote:
>>
>>> Per discussion at
>>> http://lists.llvm.org/pipermail/cfe-dev/2015-December/046321.html allow
>>> tools to work in the absence of a compilation database, but warn the user
>>> about the absence.
>>> _______________________________________________
>>> cfe-commits mailing list
>>> cfe-commits at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151203/88c283d0/attachment.html>
More information about the cfe-commits
mailing list