[PATCH] D36830: Use report_fatal_error for unsupported calling conventions

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 17 06:57:45 PDT 2017


asb created this revision.
Herald added a subscriber: javed.absar.

The calling convention can be specified by the user in IR. Failing to support a particular calling convention isn't a programming error, and so relying on llvm_unreachable to catch and report an unsupported calling convention is not appropriate.

This is a very trivial patch, but given the amount of discussion that has been generated by LLVM error handling in the past I thought it would be worth posting for comments first. In general, are people happy with this sort of cleanup? There are likely many more cases elsewhere in backends where llvm_unreachable should really be replaced by report_fatal_error, or potentially something more advanced.


https://reviews.llvm.org/D36830

Files:
  lib/Target/AArch64/AArch64ISelLowering.cpp
  lib/Target/ARM/ARMFastISel.cpp
  lib/Target/ARM/ARMISelLowering.cpp
  lib/Target/BPF/BPFISelLowering.cpp
  lib/Target/Lanai/LanaiISelLowering.cpp
  lib/Target/MSP430/MSP430ISelLowering.cpp
  lib/Target/XCore/XCoreISelLowering.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36830.111509.patch
Type: text/x-patch
Size: 5090 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170817/d2369136/attachment.bin>


More information about the llvm-commits mailing list