summaryrefslogtreecommitdiffstats
path: root/lld/wasm/MarkLive.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/wasm/MarkLive.cpp')
-rw-r--r--lld/wasm/MarkLive.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/wasm/MarkLive.cpp b/lld/wasm/MarkLive.cpp
index 018b3255b55..dfaa712c329 100644
--- a/lld/wasm/MarkLive.cpp
+++ b/lld/wasm/MarkLive.cpp
@@ -54,9 +54,9 @@ void lld::wasm::markLive() {
Enqueue(Symtab->find(Config->Entry));
Enqueue(WasmSym::CallCtors);
- // We export all defined, non-hidden symbols so they are all gc roots too
+ // We need to preserve any exported symbol
for (Symbol *Sym : Symtab->getSymbols())
- if (Sym->isDefined() && !Sym->isHidden())
+ if (Sym->isExported())
Enqueue(Sym);
// The ctor functions are all used in the synthetic __wasm_call_ctors
OpenPOWER on IntegriCloud