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

xiaohui chen via cfe-dev cfe-dev at lists.llvm.org
Mon Oct 12 10:40:56 PDT 2015


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?

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/345f6cb5/attachment.html>


More information about the cfe-dev mailing list