summaryrefslogtreecommitdiffstats
path: root/lld/wasm/Symbols.h
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2019-06-07 06:00:46 +0000
committerSam Clegg <sbc@chromium.org>2019-06-07 06:00:46 +0000
commitfd54fa5d72d5cbe076419ad31b36c19ddfc1ed33 (patch)
treeed01ef3c43267aa681660575320bc57d808f8cd2 /lld/wasm/Symbols.h
parent50f61af3f304a03f10d9ecb0828829f0a72d0099 (diff)
downloadbcm5719-llvm-fd54fa5d72d5cbe076419ad31b36c19ddfc1ed33.tar.gz
bcm5719-llvm-fd54fa5d72d5cbe076419ad31b36c19ddfc1ed33.zip
[WebAssembly] Fix for discarded init functions
When a function is excluded via comdat we shouldn't add it to the final list of init functions. Differential Revision: https://reviews.llvm.org/D62983 llvm-svn: 362769
Diffstat (limited to 'lld/wasm/Symbols.h')
-rw-r--r--lld/wasm/Symbols.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lld/wasm/Symbols.h b/lld/wasm/Symbols.h
index 98ff155fc5a..5c0f4b2ac46 100644
--- a/lld/wasm/Symbols.h
+++ b/lld/wasm/Symbols.h
@@ -69,6 +69,9 @@ public:
bool isWeak() const;
bool isHidden() const;
+ // Returns true if this symbol exists in a discarded (due to COMDAT) section
+ bool isDiscarded() const;
+
// True if this is an undefined weak symbol. This only works once
// all input files have been added.
bool isUndefWeak() const {
OpenPOWER on IntegriCloud