[PATCH] D44549: allow-multiple-definitions should completely suppress errors instead of making them warnings.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 16 03:23:36 PDT 2018


grimar added a comment.

Logic by itself looks OK to me.
+1 to leave inlining for the follow-up.



================
Comment at: lld/ELF/SymbolTable.cpp:420
   if (!D->Section || !ErrSec) {
-    reportDuplicate(Sym, NewFile);
+    error("duplicate symbol: " + toString(*Sym) + "\n>>> defined in " +
+          toString(Sym->File) + "\n>>> defined in " + toString(NewFile));
----------------
espindola wrote:
> ruiu wrote:
> > espindola wrote:
> > > Why was it necessary to inline this reportDuplicate?
> > It's not necessary, but since it is now short that it is easier to read than having a overloaded function.
> Leave that for a followup patch. There may be a better way of merging these two overloads and doing it in one patch makes the patch harder to read.
That is not what was changed by this patch, but have to note
that this (and below places) probably should be `errorOrWarn` from Config.h to support -noinhibit-exec.


https://reviews.llvm.org/D44549





More information about the llvm-commits mailing list