[lld] [lld][WebAssembly] Reset context object after each link (PR #78770)
Steven Johnson via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 19 12:42:34 PST 2024
================
@@ -47,6 +47,16 @@ namespace lld::wasm {
Configuration *config;
Ctx ctx;
+void Ctx::reset() {
+ objectFiles.clear();
----------------
steven-johnson wrote:
Nit: shouldn't we reset *all* the fields, including the `bool` fields? (And maybe initialize `isPic` to some explicit value rather than leaving it as uninited?)
https://github.com/llvm/llvm-project/pull/78770
More information about the llvm-commits
mailing list