The new mechanism is less code, and fixes the case where all inputs
are archives.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM with following change.
I first thought that it's invalid if all files are archive, but then realized that that's valid.
An object file defining an entry point function can be in an archive.
COFF/SymbolTable.cpp | ||
---|---|---|
174–184 ↗ | (On Diff #26805) | I'd make this a non-member function in Writer.cpp which takes vector<unique_ptr<ObjectFile>>& as a parameter, as this function is not that related to symbol resolution. It feels that it belongs Writer. Maybe you need to expose ObjectFiles, but that's fine. And in the Writer, you can return Config->MachineType as a default value instead of UNKNOWN. |
COFF/SymbolTable.cpp | ||
---|---|---|
174–184 ↗ | (On Diff #26805) | Config->MachineType overrides the detected value, doesn't it? That's what the existing logic seems to implement. |