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

Jan Sjodin jan_sjodin at yahoo.com
Fri Oct 12 08:16:26 PDT 2012



Ping!

- Jan




>________________________________
> From: Jan Sjodin <jan_sjodin at yahoo.com>
>To: Rafael Espíndola <rafael.espindola at gmail.com> 
>Cc: Eric Christopher <echristo at gmail.com>; "llvm-commits at cs.uiuc.edu" <llvm-commits at cs.uiuc.edu> 
>Sent: Monday, October 8, 2012 11:56 AM
>Subject: Re: [llvm-commits] Patch to add flag in llvm-extract for including aliases in the extraction.
> 
>> So, I agree that llvm-extract has a problem with aliases. With your testcase:
>
>> 
>> $ llvm-extract -func=foo test.ll -o test2.ll -S
>> $ llvm-extract -delete -func=foo test.ll -o test3.ll -S
>> $ llvm-link test2.ll test3.ll
>> llvm-link: link error in 'test3.ll': Linking globals named 
>> 'a0foo':
>> symbol multiply defined!
>> 
>> But I don't think that adding an option is the correct fix. The above
>> should just work IMHO.  What should happen I think is that test2.ll
>> should end up with just @foo and test3.ll should end up with @bar and
>> the 3 aliases.
>> 
>> If anyone wants to extract aliases, we should add a -alias option that
>> is analogous to -func and -glob.
>>
>> Would that work for you? Does anyone object to that behavior?
>
>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>
>
>- Jan
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121012/80843710/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0063_llvm_extract_w_aliases.patch
Type: application/octet-stream
Size: 3092 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121012/80843710/attachment.obj>


More information about the llvm-commits mailing list