[PATCH] D33574: PPC: Verify that branch fixups fit within the range.
Eric Christopher via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 14 13:31:44 PDT 2017
echristo added a comment.
There are two different perspectives here of assert vs unreachable vs other things.
In general you want unreachable if the code is unreachable and not a bad value - the latter you want asserts.
In this case one thing we can also do is report a fatal error if we get to this point as well with invalid assembly. There's not a lot of that in MC right now, but it's probably the right direction. Better errors would be good, but would involve some reworking of the MC infrastructure to pass around an error context and might not be worth it at the moment.
https://reviews.llvm.org/D33574
More information about the llvm-commits
mailing list