[llvm-commits] Patch to add flag in llvm-extract for including aliases in the extraction.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Sun Oct 28 17:33:14 PDT 2012


> I agree that llvm-extract should do a better job on alaises by default, and what you propose seems
> reasonable. In my mind we probably want both -alias and -with-aliases options. One operates only
> on aliases, the other is used to bundle aliases with the functions/globals, which is really the capability
> that I am looking for. It could potentially be included as a sub-option like  -alias=<with-aliases-special-option>

I noticed that the GVExtractorPass pass itself would not behave
correctly if given an alias that had an use in that file. I extended
you testcase to include that, fixed GVExtractorPass and implemented
the "better job on alaises by default".

I agree we need a -alias option just how we have a -func and a -glob.
With the default behavior fixed, can you explain why we also need

$ llvm-extract -func=bar -with-aliases ...

instead of just using

$ llvm-extract -func=bar -alias=the_alias_of_bar....

> - Jan
>

Thanks,
Rafael



More information about the llvm-commits mailing list