[cfe-dev] API for flag '-include'

Manuel Klimek via cfe-dev cfe-dev at lists.llvm.org
Mon Oct 12 10:46:16 PDT 2015


On Mon, Oct 12, 2015 at 7:41 PM xiaohui chen <xchen198812 at gmail.com> wrote:

> yes, I understand. but then users have to do this every time manually...
>
> I defined some macros inside a head file and this file must be included
> before parsing,
> so it is better to do this automatically inside the code which will make
> the user's life easier.
>
> Will this be complicated? or there is no public API to do this?
>

I would have expected your tool to programmatically add the -include flag.


>
> Thanks!
>
>
> On Mon, Oct 12, 2015 at 10:21 AM, Manuel Klimek <klimek at google.com> wrote:
>
>> If you run a libTooling tool, you usually can pass command line flags -
>> you can just pass -include there.
>>
>> On Mon, Oct 12, 2015 at 7:01 PM xiaohui chen <xchen198812 at gmail.com>
>> wrote:
>>
>>> Hi Manuel,
>>>
>>> I am writing a libtooling tool.
>>>
>>> In the command line we can use '-include' to Include file before
>>> parsing. My questions is what is the corresponding API
>>> to do this?
>>>
>>> I tried  Opts.Includes.push_back , but it seems not working...
>>>
>>> Sincerely
>>> xiaohui
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20151012/882a8546/attachment.html>


More information about the cfe-dev mailing list