[lld] [LLD][COFF] Store reference to SymbolTable instead of COFFLinkerContext in InputFile (NFC) (PR #119296)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 13 04:58:47 PST 2024


================
@@ -403,8 +404,8 @@ class BitcodeFile : public InputFile {
 // .dll file. MinGW only.
 class DLLFile : public InputFile {
 public:
-  explicit DLLFile(COFFLinkerContext &ctx, MemoryBufferRef m)
-      : InputFile(ctx, DLLKind, m) {}
+  explicit DLLFile(SymbolTable &symtab, MemoryBufferRef m)
----------------
mstorsjo wrote:

Here in `DLLFile`, we change the constructor to take a `SymbolTable&` instead, while for `ObjFile` above, we keep taking a `COFFLinkerContext&` parameter, and resolve `ctx.symtab` within the `ObjFile` constructor; 1) why the inconsistency, and 2) shouldn't we stop doing `ctx.symtab` here? Or is that a leftover that gets taken care of in one of the upcoming patches?

https://github.com/llvm/llvm-project/pull/119296


More information about the llvm-commits mailing list