summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cxxdump
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-06-24 19:57:32 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-06-24 19:57:32 +0000
commit6bf322101bebac03b63fb068fcd3158f795bcee3 (patch)
treeb9ffab2e507529dc20e5e3dae22cd40f11e2ed0e /llvm/tools/llvm-cxxdump
parent54565cf02b2f40d34605b8e74f886419829ac396 (diff)
downloadbcm5719-llvm-6bf322101bebac03b63fb068fcd3158f795bcee3.tar.gz
bcm5719-llvm-6bf322101bebac03b63fb068fcd3158f795bcee3.zip
Make computeSymbolSizes never fail.
On ELF that was already the case since getting the size of a symbol never fails. On MachO and COFF we could fail trying to get the section of a symbol. But we don't really need the section, just the section number to know if two symbols are in the same section or not. llvm-svn: 240580
Diffstat (limited to 'llvm/tools/llvm-cxxdump')
-rw-r--r--llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp b/llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp
index bd9cf7d5df2..e4d32abb95c 100644
--- a/llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp
+++ b/llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp
@@ -188,12 +188,10 @@ static void dumpCXXData(const ObjectFile *Obj) {
uint8_t BytesInAddress = Obj->getBytesInAddress();
- ErrorOr<std::vector<std::pair<SymbolRef, uint64_t>>> SymAddrOrErr =
+ std::vector<std::pair<SymbolRef, uint64_t>> SymAddr =
object::computeSymbolSizes(*Obj);
- if (error(SymAddrOrErr.getError()))
- return;
- for (auto &P : *SymAddrOrErr) {
+ for (auto &P : SymAddr) {
object::SymbolRef Sym = P.first;
uint64_t SymSize = P.second;
StringRef SymName;
OpenPOWER on IntegriCloud