API for flag '-include'

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

If you run a libTooling tool, you usually can pass command line flags - you can just pass -include there.

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!

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.