[PATCH] D33574: PPC: Verify that branch fixups fit within the range.

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 22 23:09:46 PDT 2017


asb added a comment.

Hi folks, I think llvm_unreachable is really the wrong error handling strategy here. It _won't_ necessarily cause the process to exit on a release build. This is actually one of the cases where it is possible to report a nice error without too much hassle. In https://reviews.llvm.org/rL299529 I added an MCContext parameter to MCAsmBackend::applyFixup in order to make it easy to use MCContext::reportError for effort reporting in helper functions like adjustFixupValue. Due to later upstream changes, you now get hold of your MCContext via the MCAssembler argument. You can see an example of this approach in action in https://reviews.llvm.org/D23568.


Repository:
  rL LLVM

https://reviews.llvm.org/D33574





More information about the llvm-commits mailing list