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

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Oct 30 19:58:19 PDT 2012


> Because you may not know that bar and the_alias_of_bar are related in any way if you use e.g. llvm-nm to extract symbol names, and then llvm-extract to extract them.

I guess the question is more why do you care that when extracting a
symbol foo, every alias that points to foo is also extracted?

I see that your patch uses the recursive .resolveAliasedGlobal. If you run
$ llvm-extract -with-aliases -alias=foo, don't you want to extract
aliases that alias foo?

What should be done when you hit a weak symbol? Should you be passing
false to resolveAliasedGlobal? Please include a testcase showing the
desired behavior.

The bit about erasing aliases is out of date, aliases are handled by
createGVExtractionPass now, so you should only have to put them in
GVs.

> - Jan
>

Cheers,
Rafael



More information about the llvm-commits mailing list