[lld] [LLD][COFF] Process all live import symbols in getSymbols() (PR #109117)
Jacek Caban via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 18 11:01:31 PDT 2024
================
@@ -122,16 +122,9 @@ static void getSymbols(const COFFLinkerContext &ctx,
if (!file->live)
continue;
- if (!file->thunkSym)
- continue;
-
- if (!file->thunkSym->isLive())
- continue;
-
- syms.push_back(thunkSym);
-
- if (auto *impSym = dyn_cast_or_null<Defined>(file->impSym))
----------------
cjacek wrote:
I rechecked that. In case of duplication, `addImportData` reports an error. However, it's possible to turn that error into a warning with `-force`, so it may be a null after all. I restored the null check.
`impSym` is already declared as `DefinedImportData` and as far as I can tell there is no way it can be replaced, so the cast is not needed.
https://github.com/llvm/llvm-project/pull/109117
More information about the llvm-commits
mailing list