Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, it called `::operator new` which may throw `std::bad_alloc`, regardless of whether LLVM itself was built with exception handling, and this can cause safety issues if outside code has destructors that will call back into LLVM. Now we use `::operator new(..., nothrow)` and call `llvm::report_bad_alloc_error` when allocation fails, which will abort when LLVM is built without exceptions. Ref: llvm#85281
- Loading branch information