summaryrefslogtreecommitdiff
path: root/lld/wasm/MarkLive.cpp
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2025-01-09 18:49:54 +0900
committerNAKAMURA Takumi <geek4civic@gmail.com>2025-01-09 18:49:54 +0900
commite2810c9a248f4c7fbfae84bb32b6f7e01027458b (patch)
treeae0b02a8491b969a1cee94ea16ffe42c559143c5 /lld/wasm/MarkLive.cpp
parentfa04eb4af95c1ca7377279728cb004bcd2324d01 (diff)
parentbdcf47e4bcb92889665825654bb80a8bbe30379e (diff)
Merge branch 'users/chapuni/cov/single/base' into users/chapuni/cov/single/switchusers/chapuni/cov/single/switch
Diffstat (limited to 'lld/wasm/MarkLive.cpp')
-rw-r--r--lld/wasm/MarkLive.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lld/wasm/MarkLive.cpp b/lld/wasm/MarkLive.cpp
index 1b99f03747fb..13c7a3d894fe 100644
--- a/lld/wasm/MarkLive.cpp
+++ b/lld/wasm/MarkLive.cpp
@@ -106,8 +106,8 @@ void MarkLive::enqueueRetainedSegments(const ObjFile *file) {
void MarkLive::run() {
// Add GC root symbols.
- if (!config->entry.empty())
- enqueue(symtab->find(config->entry));
+ if (!ctx.arg.entry.empty())
+ enqueue(symtab->find(ctx.arg.entry));
// We need to preserve any no-strip or exported symbol
for (Symbol *sym : symtab->symbols())
@@ -166,7 +166,7 @@ void MarkLive::mark() {
}
void markLive() {
- if (!config->gcSections)
+ if (!ctx.arg.gcSections)
return;
LLVM_DEBUG(dbgs() << "markLive\n");
@@ -175,7 +175,7 @@ void markLive() {
marker.run();
// Report garbage-collected sections.
- if (config->printGcSections) {
+ if (ctx.arg.printGcSections) {
for (const ObjFile *obj : ctx.objectFiles) {
for (InputChunk *c : obj->functions)
if (!c->live)
@@ -207,7 +207,7 @@ void markLive() {
bool MarkLive::isCallCtorsLive() {
// In a reloctable link, we don't call `__wasm_call_ctors`.
- if (config->relocatable)
+ if (ctx.arg.relocatable)
return false;
// In Emscripten-style PIC, we call `__wasm_call_ctors` which calls