llvm-project
cd62817f - TargetLibraryInfo: Add NetBSD, OpenBSD and DragonFly function list (#150885)

Commit
12 hours ago
TargetLibraryInfo: Add NetBSD, OpenBSD and DragonFly function list (#150885) Describe which libc functions NetBSD, OpenBSD and DragonFly have, so that LLVM uses the ones that exist and does not emit calls to ones that do not. NetBSD: - getc_unlocked, getchar_unlocked, putc_unlocked and putchar_unlocked are available. OpenBSD: - ffsl and ffsll are available. - getc_unlocked, getchar_unlocked, putc_unlocked and putchar_unlocked are available. DragonFly: - bcmp, ffsl, ffsll, fls, flsl and flsll are available. - fputc_unlocked, fputs_unlocked, fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked, putc_unlocked and putchar_unlocked are available. None of them have __strndup, __memccpy_chk, __strlen_chk, fmaximum_num, fminimum_num or roundeven (and the f/l variants), so mark them unavailable, the same as FreeBSD. The FreeBSD block is split up so these lists can be shared. There is no change for FreeBSD. Add NetBSD, OpenBSD and DragonFly RUN lines to the ffs-1.ll InstCombine test, a DragonFly RUN line to fls.ll, and a unit test that checks these lists for all of the BSDs, including FreeBSD.
Author
Parents
Loading