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

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 11 05:16:15 PDT 2019


ruiu added inline comments.


================
Comment at: lld/COFF/SymbolTable.h:123
+
+  ObjFile *ResourceObjFile = nullptr;
 };
----------------
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.


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

https://reviews.llvm.org/D63109





More information about the llvm-commits mailing list