Remove bogus std::error_code returns form SectionRef.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 8 Oct 2014 15:28:58 +0000 (15:28 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 8 Oct 2014 15:28:58 +0000 (15:28 +0000)
commit8175be535acfffc3977231f58382a07e554d8d6b
tree8daf5a094f45b1653576fa034a76229bc3850441
parent1a98f792a50640bac33dd1427af8d3fe80530e0e
Remove bogus std::error_code returns form SectionRef.

There are two methods in SectionRef that can fail:

* getName: The index into the string table can be invalid.
* getContents: The section might point to invalid contents.

Every other method will always succeed and returning and std::error_code just
complicates the code. For example, a section can have an invalid alignment,
but if we are able to get to the section structure at all and create a
SectionRef, we will always be able to read that invalid alignment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219314 91177308-0d34-0410-b5e6-96231b3b80d8
22 files changed:
include/llvm/Object/COFF.h
include/llvm/Object/ELFObjectFile.h
include/llvm/Object/MachO.h
include/llvm/Object/ObjectFile.h
lib/DebugInfo/DWARFContext.cpp
lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h
lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h
lib/Object/COFFObjectFile.cpp
lib/Object/MachOObjectFile.cpp
lib/Object/Object.cpp
lib/ProfileData/CoverageMappingReader.cpp
tools/llvm-cov/TestingSupport.cpp
tools/llvm-objdump/MachODump.cpp
tools/llvm-objdump/llvm-objdump.cpp
tools/llvm-readobj/ARMWinEHPrinter.cpp
tools/llvm-readobj/COFFDumper.cpp
tools/llvm-readobj/MachODumper.cpp
tools/llvm-size/llvm-size.cpp
tools/llvm-vtabledump/llvm-vtabledump.cpp