diff options
| author | Sam Clegg <sbc@chromium.org> | 2018-06-28 17:04:58 +0000 |
|---|---|---|
| committer | Sam Clegg <sbc@chromium.org> | 2018-06-28 17:04:58 +0000 |
| commit | ce004bfe35c20d227865605427a11ff90ccb23b3 (patch) | |
| tree | 3860ac0f4012651820b01211552863326a4e5968 /lld/wasm/MarkLive.cpp | |
| parent | da5e7e11d1072ea13460f0b4ca77b7de35bf2bb8 (diff) | |
| download | bcm5719-llvm-ce004bfe35c20d227865605427a11ff90ccb23b3.tar.gz bcm5719-llvm-ce004bfe35c20d227865605427a11ff90ccb23b3.zip | |
[WebAssembly] Add support for bitcode archive members
This change effects the behavior of --export-all. Previously
--export-all would only effect symbols that survived GC. Now
--export-all will prevent any non-local symbols from being GCed.
Differential Revision: https://reviews.llvm.org/D48673
llvm-svn: 335878
Diffstat (limited to 'lld/wasm/MarkLive.cpp')
| -rw-r--r-- | lld/wasm/MarkLive.cpp | 4 |
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 |

