ΒΆvoid report_bad_alloc_error(
    const char* Reason,
    bool GenCrashDiag = true)

Description

Reports a bad alloc error, calling any user defined bad alloc error handler. In contrast to the generic 'report_fatal_error' functions, this function is expected to return, e.g. the user defined error handler throws an exception. Note: When throwing an exception in the bad alloc handler, make sure that the following unwind succeeds, e.g. do not trigger additional allocations in the unwind chain. If no error handler is installed (default), then a bad_alloc exception is thrown, if LLVM is compiled with exception support, otherwise an assertion is called.

Declared at: llvm/include/llvm/Support/ErrorHandling.h:116

Parameters

const char* Reason
bool GenCrashDiag = true