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

Anutosh Bhat via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 9 00:43:34 PST 2024


anutosh491 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

I opened an issue to track the progress on this 
https://github.com/llvm/llvm-project/issues/119180

Y'all could let me know your thoughts on the same and let me know if my thinking on the issue makes sense.

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


More information about the llvm-commits mailing list