[PATCH] D41113: [LLVMgold] Don't set resolutions for undefined symbols to 'Prevailing'
Eugene Leviant via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 13 10:27:05 PST 2017
evgeny777 added a comment.
> the fact that the existing test would fail this new assertion without your fix is good enough.
Unfortunately it will fail both with and w/o the fix (in case assertion is added), because llvm-lto doesn't use gold plugin in any way. One can explicitly set both ASM undef and IR def as prevailing by simply giving this resolution file:
asm_undefined2.ll.tmp.o
-r=asm_undefined2.ll.tmp.o,patatino,pl
-r=asm_undefined2.ll.tmp.o,foo,pl
-r=asm_undefined2.ll.tmp.o,patatino,pl
-r=asm_undefined2.ll.tmp.o,foo,pl
to llvm-lto2.
I now wonder if we can simply ignore empty symbol name with this (`check-all` passes flawlessly as well):
if (Res.Prevailing && !Sym.getIRName().empty())
GlobalRes.IRName = Sym.getIRName();
In such case there is no need to modify gold plugin. Hope @pcc will bring some light.
https://reviews.llvm.org/D41113
More information about the llvm-commits
mailing list