[TextAPI][elfabi] Make TBE handlers functions that return Errors
authorArmando Montanez <amontanez@google.com>
Mon, 10 Dec 2018 02:36:33 +0000 (02:36 +0000)
committerArmando Montanez <amontanez@google.com>
Mon, 10 Dec 2018 02:36:33 +0000 (02:36 +0000)
commite353459549fe27d9c28e80166eb75c363dfa1726
tree6a2a89a9590fc831cf7c6f7b95b4945732a05a39
parent5cc8920d02e90e1a5ec2e1a740f0c7f1bd87002f
[TextAPI][elfabi] Make TBE handlers functions that return Errors

Since TBEHandler doesn't maintain state or otherwise have any need to be
a class right now, the read and write functions have been moved out and
turned into standalone functions. Additionally, the TBE read function
has been updated to return an Expected value for better error handling.
Tests have been updated to reflect these changes.

Differential Revision: https://reviews.llvm.org/D55450

llvm-svn: 348735
llvm/include/llvm/TextAPI/ELF/TBEHandler.h
llvm/lib/TextAPI/ELF/TBEHandler.cpp
llvm/unittests/TextAPI/CMakeLists.txt
llvm/unittests/TextAPI/ELFYAMLTest.cpp