[Mlir-commits] [clang] [llvm] [mlir] [IR] Require well-formed IR for BasicBlock::getTerminator (PR #189416)

Martin Storsjö llvmlistbot at llvm.org
Tue Mar 31 00:28:57 PDT 2026


mstorsjo wrote:

This triggers failures when building with `-fasync-exceptions`, which is used widely by Wine. Reduced repro:
```c
long a() {
  long b;
  __try {
    b;
  } __except (a()) {
  }
}
```
```console
$ clang -target x86_64-windows -c async-repro.c -fasync-exceptions
clang: ../include/llvm/IR/BasicBlock.h:238: const llvm::Instruction* llvm::BasicBlock::getTerminator() const: Assertion `hasTerminator() && "cannot get terminator of non-well-formed block"' failed.
```

CC @cjacek

https://github.com/llvm/llvm-project/pull/189416


More information about the Mlir-commits mailing list