On 9 October 2013 19:04, Reid Kleckner <[email protected]> wrote:
> Another problem I encountered is that the Microsoft linker doesn't like it
> if you chain weak aliases like so:
>
> $ cat t.ll
> @my_alias = alias linkonce_odr void ()* @my_inline
> @my_alias2 = alias linkonce_odr void ()* @my_alias
> define linkonce_odr void @my_inline() {
>   ret void
> }
> define i32 @main() {
>   call void @my_alias2()
>   ret i32 0
> }
>
> $ llc t.ll -o tll.obj -filetype=obj && link tll.obj -defaultlib:libcmt.lib
> -out:t.exe -nologo
> tll.obj : error LNK2001: unresolved external symbol _my_alias2
> tll.obj : error LNK2001: unresolved external symbol _my_alias
>
> To work around this, when should we forward my_alias2 through to my_inline?
> In clang, LLVM, or MC?


I will see if I can make MC handle this. In general having the backend
implement the alias limitations is probably better.

Thanks,
Rafael
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to