aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/SymbolSize.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Object/SymbolSize.cpp')
-rw-r--r--llvm/lib/Object/SymbolSize.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Object/SymbolSize.cpp b/llvm/lib/Object/SymbolSize.cpp
index cb20fef..635cd83 100644
--- a/llvm/lib/Object/SymbolSize.cpp
+++ b/llvm/lib/Object/SymbolSize.cpp
@@ -65,6 +65,13 @@ llvm::object::computeSymbolSizes(const ObjectFile &O) {
return Ret;
}
+ if (const auto *E = dyn_cast<WasmObjectFile>(&O)) {
+ for (SymbolRef Sym : E->symbols()) {
+ Ret.push_back({Sym, E->getSymbolSize(Sym)});
+ }
+ return Ret;
+ }
+
// Collect sorted symbol addresses. Include dummy addresses for the end
// of each section.
std::vector<SymEntry> Addresses;