summaryrefslogtreecommitdiffstats
path: root/lld/wasm/Symbols.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/wasm/Symbols.cpp')
-rw-r--r--lld/wasm/Symbols.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lld/wasm/Symbols.cpp b/lld/wasm/Symbols.cpp
index 60030bef3fa..f8ea47176a3 100644
--- a/lld/wasm/Symbols.cpp
+++ b/lld/wasm/Symbols.cpp
@@ -45,6 +45,14 @@ WasmSymbolType Symbol::getWasmType() const {
llvm_unreachable("invalid symbol kind");
}
+const WasmSignature *Symbol::getSignature() const {
+ if (auto* F = dyn_cast<FunctionSymbol>(this))
+ return F->Signature;
+ if (auto *L = dyn_cast<LazySymbol>(this))
+ return L->Signature;
+ return nullptr;
+}
+
InputChunk *Symbol::getChunk() const {
if (auto *F = dyn_cast<DefinedFunction>(this))
return F->Function;
OpenPOWER on IntegriCloud