diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Object/SymbolSize.cpp')
| -rw-r--r-- | contrib/llvm-project/llvm/lib/Object/SymbolSize.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/llvm-project/llvm/lib/Object/SymbolSize.cpp b/contrib/llvm-project/llvm/lib/Object/SymbolSize.cpp index eee5505b8c14..cb20feffb710 100644 --- a/contrib/llvm-project/llvm/lib/Object/SymbolSize.cpp +++ b/contrib/llvm-project/llvm/lib/Object/SymbolSize.cpp @@ -59,6 +59,12 @@ llvm::object::computeSymbolSizes(const ObjectFile &O) { return Ret; } + if (const auto *E = dyn_cast<XCOFFObjectFile>(&O)) { + for (XCOFFSymbolRef Sym : E->symbols()) + Ret.push_back({Sym, Sym.getSize()}); + return Ret; + } + // Collect sorted symbol addresses. Include dummy addresses for the end // of each section. std::vector<SymEntry> Addresses; @@ -86,7 +92,7 @@ llvm::object::computeSymbolSizes(const ObjectFile &O) { // Compute the size as the gap to the next symbol. If multiple symbols have // the same address, give both the same size. Because Addresses is sorted, - // using two pointers to keep track of the current symbol vs. the next symbol + // use two pointers to keep track of the current symbol vs. the next symbol // that doesn't have the same address for size computation. for (unsigned I = 0, NextI = 0, N = Addresses.size() - 1; I < N; ++I) { auto &P = Addresses[I]; |
