[PATCH] D50598: LLD COFF: Add support for /force:multiple option

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 3 01:54:30 PDT 2018


ruiu added inline comments.


================
Comment at: COFF/SymbolTable.cpp:205
       if (Undefs.count(Sym))
-        errorOrWarn("undefined symbol: " + Sym->getName() +
+        errorOrWarnUnresolved("undefined symbol: " + Sym->getName() +
                     getSymbolLocations(File, SymIndex));
----------------
Then you don't need to change the function name.


================
Comment at: COFF/SymbolTable.cpp:265
 void SymbolTable::reportDuplicate(Symbol *Existing, InputFile *NewFile) {
-  error("duplicate symbol: " + toString(*Existing) + " in " +
-        toString(Existing->getFile()) + " and in " + toString(NewFile));
+  errorOrWarnMultiple("duplicate symbol: " + toString(*Existing) + " in " +
+          toString(Existing->getFile()) + " and in " + toString(NewFile));
----------------
Looks like this is the only place where you are using this function. I'd inline it.



Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D50598





More information about the llvm-commits mailing list