[lld] [lld][wasm] Clear lazyBitcodeFiles while resetting context (PR #118440)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 2 23:58:00 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lld
Author: Anutosh Bhat (anutosh491)
<details>
<summary>Changes</summary>
Hi @<!-- -->sbc100
I was looking into a use case involving the link function (which got my attention to reset).
I see that `lazyBitcodeFiles` variable was introduced here https://github.com/llvm/llvm-project/pull/114327 but I don't see it being reset while destroying the context eventually. Hopefully this should be the correct way to address it.
---
Full diff: https://github.com/llvm/llvm-project/pull/118440.diff
1 Files Affected:
- (modified) lld/wasm/Driver.cpp (+1)
``````````diff
diff --git a/lld/wasm/Driver.cpp b/lld/wasm/Driver.cpp
index 8d01ff839ddfcf..37a0156c728f6f 100644
--- a/lld/wasm/Driver.cpp
+++ b/lld/wasm/Driver.cpp
@@ -59,6 +59,7 @@ void Ctx::reset() {
stubFiles.clear();
sharedFiles.clear();
bitcodeFiles.clear();
+ lazyBitcodeFiles.clear();
syntheticFunctions.clear();
syntheticGlobals.clear();
syntheticTables.clear();
``````````
</details>
https://github.com/llvm/llvm-project/pull/118440
More information about the llvm-commits
mailing list