63 Commits

Author SHA1 Message Date
Siva Chandra
7d7df7f237
[libc] Add a developer doc about adding new config options. (#66432) 2023-09-15 14:34:25 -07:00
Michael Jones
aa1eacd10c [libc][docs] Printf behavior doc
In the document on undefined behavior, I noted that writing down your
decisions is very important. This document contains all the information
for compile flags and undefined behavior for our printf.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D158311
2023-09-13 13:42:30 -07:00
Kazu Hirata
5dd9568717 Fix typos in documentation 2023-09-02 09:32:48 -07:00
Guillaume Chatelet
575310330b [libc][doc] Update macros documentation
Update documentaiton now that macros are laid out in a more structured way.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D143911
2023-08-08 08:02:30 +00:00
Tue Ly
d9428945df [libc][Obvious] Fix docs warning. 2023-06-26 14:32:28 +00:00
Alex Brachet
61c9052cec [libc] Add LIBC_INLINE_VAR for inline variables
These are the only variables I could find that use LIBC_INLINE. Note, these are namespace scoped constexpr so local linkage is implied. inline is useful here to silence clang's unused-const-variable variable. For Fuchsia, the distinction between LIBC_INLINE and LIBC_INLINE_VAR is helpful because we define LIBC_INLINE as `[[gnu::always_inline]] inline` when building with gcc. This isn't meaningful on variables.

Alternatively, we could make these variables simply constexpr and also add `[[maybe_unused]]`

Reviewed By: sivachandra, mcgrathr

Differential Revision: https://reviews.llvm.org/D152951
2023-06-16 15:46:32 +00:00
Michael Jones
99686c5ed1 [libc][docs] Add undefined behavior doc to site
This document is based on the RFC posted to discourse:
https://discourse.llvm.org/t/rfc-defining-undefined-behavior-in-libc/

Reviewed By: sivachandra, lntue

Differential Revision: https://reviews.llvm.org/D152588
2023-06-12 11:13:51 -07:00
Kazu Hirata
282798fefd [libc] Fix typos in documentation 2023-05-06 11:26:32 -07:00
Kazu Hirata
e042efdab6 [libc] Fix typos in documentation 2023-04-24 23:31:48 -07:00
Siva Chandra Reddy
08b9835072 [libc][docs] Add a section about allocations and deallocations to the style doc.
Fixes #59277 - The main part of that bug has already been addressed. This commit
just adds documentation.

Reviewed By: jeffbailey

Differential Revision: https://reviews.llvm.org/D146115
2023-03-15 20:41:51 -07:00
Siva Chandra Reddy
4155503b71 [libc] Add a note about using assertions in the libc runtime code.
Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D145466
2023-03-07 10:16:50 -08:00
Siva Chandra Reddy
4052bc8674 [libc] Make errno an entrypoint.
The entrypoint has been added to the various entrypoint lists. The libc
code style doc has been updated with information on how errno should be
set from the libc runtime code.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D145179
2023-03-03 06:59:19 +00:00
Siva Chandra Reddy
54faf22f7b [libc][NFC] Move all developer docs into a sub-directory docs/dev. 2023-03-02 10:59:49 -08:00