[lld] [lld][wasm] Clear lazyBitcodeFiles while resetting context (PR #118440)

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 3 22:18:45 PST 2024


sbc100 wrote:

> > I guess we can land this without a test, especially since #78640 also didn't have any test.
> > @MaskRay do you know of any tests for context reuse/reset?
> 
> We have basic unittests in `lld/unittest/AsLibELF`. We should have wasm tests as well, but it's difficult and probably unnecessary to cover just `lazyBitcodeFiles`.
> 
> If lld/wasm constructs `Ctx` and drops `reset`, this pitfall will be removed. https://maskray.me/blog/2024-11-17-removing-global-state-from-lld Eliminating the global ctx variable

Both of those sounds like good ideas, thank you.   I don't think we need to block this change on those though.

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


More information about the llvm-commits mailing list