6 Commits

Author SHA1 Message Date
Petr Hosek
d386a5582b
[libc] Make static_assert available even if NDEBUG is set (#99742)
This addresses an issue introduced in #98826 where static_assert was
made defined only when NDEBUG is not set which is different from all
other C libraries and breaks any code that uses static_assert and
doesn't guard it with NDEBUG.
2024-07-20 00:56:52 -07:00
aaryanshukla
34e06dc371
[libc] newheadergen: added assert.yaml (#98826)
- removed assert macro definitions in api.td
- included macro definitions in assert.h.def
- added assert.yaml
2024-07-15 16:52:32 -07:00
aniplcc
11bd19a7a2
[libc][assert] define __STDC_VERSION_ASSERT_H__ (#87592)
Fixes #87561
2024-04-24 13:01:16 -07:00
Nick Desaulniers
cdbec7baf1
[libc] fix up the use of angle includes in include/ (#86027)
Performed en-masse via:

    $ grep -rn "#include <ll" libc/include -l | \
      xargs perl -pi -e 's/#include <ll(.*)>/#include "ll$1"/'
    $ grep -rn "#include <__" libc/include -l | \
      xargs perl -pi -e 's/#include <__(.*)>/#include "__$1"/'

Link: #83463
Link: #83210
2024-03-22 08:24:08 -07:00
Paula Toth
66d00feb18 [libc][NFC] Make all top of file comments consistent.
Summary:
Made all header files consistent based of this documentation: https://llvm.org/docs/CodingStandards.html#file-headers.
And did the same for all source files top of file comments.

Reviewers: sivachandra, abrachet

Reviewed By: sivachandra, abrachet

Subscribers: MaskRay, tschuett, libc-commits

Tags: #libc-project

Differential Revision: https://reviews.llvm.org/D77533
2020-04-08 10:18:37 -07:00
Alex Brachet
b47c9f535c [libc] Add initial assert definition
Summary: 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).

Reviewers: sivachandra, gchatelet, PaulkaToast

Reviewed By: sivachandra

Subscribers: mgorny, MaskRay, tschuett, libc-commits

Differential Revision: https://reviews.llvm.org/D75420
2020-03-11 23:45:58 -04:00