Files
clang-p2996/libc/include/setjmp.yaml
Alan Zhao fd4c4ed712 [libc] Add returns_twice attribute to setjmp(3) (#124370)
This is to ensure that calls to `setjmp(3)` result in correct code
generation that respects `setjmp(3)`'s `returns_twice` behavior.
Otherwise, we might run into bugs (for example, Clang may perform
tail-call optimization on this function if `-fno-builtins` is set
(#122840)).

---------

Co-authored-by: Nick Desaulniers <nick.desaulniers@gmail.com>
2025-02-05 14:37:03 -08:00

24 lines
396 B
YAML

header: setjmp.h
header_template: setjmp.h.def
macros: []
types:
- type_name: jmp_buf
enums: []
objects: []
functions:
- name: longjmp
standards:
- stdc
return_type: _Noreturn void
arguments:
- type: jmp_buf
- type: int
- name: setjmp
standards:
- stdc
return_type: int
attributes:
- _Returns_twice
arguments:
- type: jmp_buf