Improve error handling for SmallVector programming errors
This patch changes errors in `SmallVector::grow` that are independent of memory capacity to be reported using report_fatal_error or std::length_error instead of report_bad_alloc_error, which falsely signals an OOM. It also cleans up a few related things: - makes report_bad_alloc_error to print the failure reason passed to it. - fixes the documentation to indicate that report_bad_alloc_error calls `abort()` not "an assertion" - uses a consistent name for the size/capacity argument to `grow` and `grow_pod` Reviewed By: mehdi_amini, MaskRay Differential Revision: https://reviews.llvm.org/D86892
Loading
Please sign in to comment