summaryrefslogtreecommitdiffstats
path: root/lld/wasm/Writer.cpp
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2018-06-28 17:04:58 +0000
committerSam Clegg <sbc@chromium.org>2018-06-28 17:04:58 +0000
commitce004bfe35c20d227865605427a11ff90ccb23b3 (patch)
tree3860ac0f4012651820b01211552863326a4e5968 /lld/wasm/Writer.cpp
parentda5e7e11d1072ea13460f0b4ca77b7de35bf2bb8 (diff)
downloadbcm5719-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/Writer.cpp')
-rw-r--r--lld/wasm/Writer.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/lld/wasm/Writer.cpp b/lld/wasm/Writer.cpp
index 41562e3c532..37ad32452a9 100644
--- a/lld/wasm/Writer.cpp
+++ b/lld/wasm/Writer.cpp
@@ -740,11 +740,7 @@ void Writer::calculateExports() {
unsigned FakeGlobalIndex = NumImportedGlobals + InputGlobals.size();
for (Symbol *Sym : Symtab->getSymbols()) {
- if (!Sym->isDefined())
- continue;
- if (Sym->isHidden() && !Config->ExportAll)
- continue;
- if (Sym->isLocal())
+ if (!Sym->isExported())
continue;
if (!Sym->isLive())
continue;
OpenPOWER on IntegriCloud