================ @@ -1780,6 +1780,20 @@ LValue CIRGenFunction::emitLoadOfReferenceLValue(Address refAddr, pointeeBaseInfo); } +void CIRGenFunction::emitTrap(mlir::Location loc, bool createNewBlock) { ---------------- Lancern wrote:
I'd rather not do this change in this PR. The biggest reason is, in classic CodeGen, the sanitize calls for the unreachable emission in `emitImplicitReturn` are different from the sanitizer calls emitted in `emitUnreachable`, see https://godbolt.org/z/c1v9bnc8d: - An explicit call to `__builtin_unreachable` emits sanitizer call to `__ubsan_handle_builtin_unreachable`, which is what will be emitted in `emitUnreachable`; - A missing return in `emitImplicitReturn` emits sanitizer call to `__ubsan_handle_missing_return`. `emitUnreachable` and `emitTrap` also (optionally) resets the insertion point of the IR builder, which is not that helpful for code in `emitImplicitReturn`. https://github.com/llvm/llvm-project/pull/151363 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits