Add <type> @llvm.trapping.<type>(<type>) intrinsic.
This is intended to produce either the given value or, if we can trace a
use of the value to an instruction with side-effects, a trap.
Notionally, it behaves as a nondeterministic choice between the given
value and poison, where the choice is made angelically such that the
given value is always chosen when the program does not reach a trap.
Simplify trapping(x) and convert it into traps where possible.
Update Clang CodeGen to produce trapping(x) in trivial auto var init
mode.
Here you need something like:
Because you can be storing a constant which is layout-compatible with the location, but which doesn't have the same type (say, when we have an explicit padding array of bytes). Line 1184 does that already for other code paths.