dmd/changelog/druntime.expect-trap.dd
Nicholas Wilson 3bcdd191d2 Add expect and trap to core.builtins
This exists mostly as a way to harmonise between the different spellings of the same concepts in LDC and GDC, rather than to provide a useful implementation from DMD.
2024-09-18 15:18:59 +01:00

7 lines
368 B
Text

Adds `expect`, `[un]likely`, `trap` to `core.builtins`
Adds the functions `expect` and `likely`/unlikely` for branch and value hints for the LDC/GDC compilers.
DMD ignores these hints.
Adds `trap` to lowered to the target dependent trap instruction.
If the target does not have a trap instruction, this intrinsic will be lowered to the call of the abort() function.