[PATCH] D63109: lld-link: Reject more than one resource .obj file

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 11 07:00:28 PDT 2019


thakis added inline comments.


================
Comment at: lld/COFF/SymbolTable.h:123
+
+  ObjFile *ResourceObjFile = nullptr;
 };
----------------
ruiu wrote:
> This pointer is kept only to print out a filename in an error message, but the visibility of this variable seems a bit too broad. SymbolTable does a lot of things, so when I first saw this variable, this is part of a logic that does some nontrivial thing, which isn't true.
> 
> Do you think you can write a function that scans all members of ObjFile::Instances after we get all input files to see if there are more than two files having a resource section? That way I think we can avoid adding a new member to the symbol table.
That's a good suggestion, done.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63109/new/

https://reviews.llvm.org/D63109





More information about the llvm-commits mailing list