Factor out the checking of string tables.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 29 Jun 2015 14:39:25 +0000 (14:39 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 29 Jun 2015 14:39:25 +0000 (14:39 +0000)
commit9a6c9023325b44115e5559098c4e01914d13ee82
tree54be58bee1699532910fd58591526239bc6f7357
parent528a204ab98445917576e6bb74136b5c34b94a7f
Factor out the checking of string tables.

This moves the error checking for string tables to getStringTable which returns
an ErrorOr<StringRef>.

This improves error checking, makes it uniform across all string tables and
makes it possible to check them once instead of once per name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240950 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/ELF.h
include/llvm/Object/Error.h
lib/Object/Error.cpp
test/Object/Inputs/invalid-strtab-size.elf [new file with mode: 0644]
test/Object/invalid.test
tools/llvm-objdump/llvm-objdump.cpp
tools/llvm-readobj/ELFDumper.cpp
tools/obj2yaml/elf2yaml.cpp