[libc-commits] [PATCH] D75420: [libc] Add initial assert definition
Alex Brachet via Phabricator via libc-commits
libc-commits at lists.llvm.org
Sat Feb 29 23:19:27 PST 2020
abrachet created this revision.
abrachet added reviewers: sivachandra, gchatelet, PaulkaToast.
Herald added subscribers: tschuett, MaskRay, mgorny.
This patch adds a temporary `__assert_fail` and `assert` definition to make it available to internal llvm libc code. `__assert_fail` writes to fd 2 directly instead of `stderr`, using SYS_write. I have not put it in its own linux directory because this is temporary and it should be using stdio's api in the future. It does not currently print out the line number (although we could do that by stringifying `__LINE__` if reviewers wish).
https://reviews.llvm.org/D75420
Files:
libc/config/linux/api.td
libc/include/CMakeLists.txt
libc/include/assert.h.def
libc/lib/CMakeLists.txt
libc/spec/stdc.td
libc/src/CMakeLists.txt
libc/src/assert/CMakeLists.txt
libc/src/assert/__assert_fail.cpp
libc/src/assert/assert.h
libc/test/src/CMakeLists.txt
libc/test/src/assert/CMakeLists.txt
libc/test/src/assert/assert_test.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75420.247487.patch
Type: text/x-patch
Size: 8346 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20200301/39407ca0/attachment-0001.bin>
More information about the libc-commits
mailing list