[clang] [codegen]Ensure __builtin_trap() has an unreachable (PR #197789)

Vy Nguyen via cfe-commits cfe-commits at lists.llvm.org
Thu May 14 18:00:04 PDT 2026


oontvoo wrote:

> I guess we can do this... but what's the benefit?

At `-O0` (ie., debug build, with dead code elimination disabled),  this  could help keeping the binary small because all the stuff that physically follow the trap can be safely dropped (`unreachable` and `ClearInsertionPoint()` ensure that)



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


More information about the cfe-commits mailing list