[PATCH] D69167: [llvm/Object] - Make ELFObjectFile::getRelocatedSection return Expected<section_iterator>.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 20 08:23:15 PDT 2019


grimar added a comment.

In D69167#1714967 <https://reviews.llvm.org/D69167#1714967>, @dblaikie wrote:

> Generally makes sense. Hopefully some other folks chime in too, though.
>
> (I wonder if it makes sense not to necessarily test this codepath in every tool - seems like maybe too much test coverage)


Yes. I thought about the same.

I think it is good to have in llvm-readobj, llvm-objdump and llvm-dwarfdump, because these are tools used for inspecting corrupt
objects more often and it worth to check their error message text reported and the behavior. Adding tests for them was my primary
intention.

I added a test for llvm-cxxdump because it was easy, but I never used this tool before or wrote patches for it. I do not know how
much it is excessive.

I didn't add a test for RuntimeDyld because I am not familiar with it too and did not find how to do it quickly. Also I did not see any
other error checking tests around, so I supposed it might be not so important (to check a one more possible broken input case).

Given all the above I am going to commit this tomorrow. but will be happy to address any post-review comments/requests if any.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69167/new/

https://reviews.llvm.org/D69167





More information about the llvm-commits mailing list