[GWP-ASan] Change unreachable -> trap to work around DCE bug.

trapOnAddress is designed to SEGV on a specific address. Unfortunately,
with an IR change, __builtin_unreachable() ends up doing DCE on things
that have side effects, like the load that causes the trap.

Change to __builtin_trap() to avoid the optimisation.

Root cause is still an LLVM bug, and tracked in

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D105654

GitOrigin-RevId: d458f379324967c3c408be06e21aad9bc92c54cb
Change-Id: Ie6c03d4f73f5314ed8e340568f63830be9d5499d
1 file changed