Namespaces
Records
Functions
-
template <typename V, typename A>V align_up (V val, A align)Defined at line 24 of file ../../third_party/llvm-libc/src/src/__support/arg_list.h
-
template <typename T>T byte_swap (T value) -
size_t complementary_span (const char * src, const char * segment)Returns the maximum length span that contains only characters not found in
'segment'. If no characters are found, returns the length of 'src'.
Defined at line 30 of file ../../third_party/llvm-libc/src/src/string/string_utils.h
-
template <>uint16_t byte_swap<unsigned short> (uint16_t value)Defined at line 34 of file ../../third_party/llvm-libc/src/src/__support/endian_internal.h
-
template <typename CharType>size_t first_non_whitespace (const CharType *__restrict src, size_t src_len)Returns the idx to the first character in src that is not a whitespace
character (as determined by isspace())
Defined at line 36 of file ../../third_party/llvm-libc/src/src/__support/str_to_integer.h
-
template <typename CharType>size_t first_non_whitespace (const CharType *__restrict src, size_t src_len)Returns the idx to the first character in src that is not a whitespace
character (as determined by isspace())
Defined at line 36 of file ../../third_party/llvm-libc/src/src/__support/str_to_integer.h
-
bool islower (char ch)Similarly, do not change these functions to use case ranges. e.g.
bool islower(char ch) {
switch(ch) {
case 'a'...'z':
return true;
}
}
This assumes the character ranges are contiguous, which they aren't in
EBCDIC. Technically we could use some smaller ranges, but that's even harder
to read.
Defined at line 40 of file ../../third_party/llvm-libc/src/src/__support/ctype_utils.h
-
template <>uint32_t byte_swap<unsigned int> (uint32_t value)Defined at line 42 of file ../../third_party/llvm-libc/src/src/__support/endian_internal.h
-
template <bool SkipDelim = true>char * string_token (char *__restrict src, const char *__restrict delimiter_string, char **__restrict context)Given the similarities between strtok and strtok_r, we can implement both
using a utility function. On the first call, 'src' is scanned for the
first character not found in 'delimiter_string'. Once found, it scans until
the first character in the 'delimiter_string' or the null terminator is
found. We define this span as a token. The end of the token is appended with
a null terminator, and the token is returned. The point where the last token
is found is then stored within 'context' for subsequent calls. Subsequent
calls will use 'context' when a nullptr is passed in for 'src'. Once the null
terminating character is reached, returns a nullptr.
Defined at line 52 of file ../../third_party/llvm-libc/src/src/string/string_utils.h
-
template <>uint64_t byte_swap<unsigned long> (uint64_t value)Defined at line 53 of file ../../third_party/llvm-libc/src/src/__support/endian_internal.h
-
template <>uint64_t byte_swap<unsigned long long> (uint64_t value)Defined at line 53 of file ../../third_party/llvm-libc/src/src/__support/endian_internal.h
-
bool isupper (char ch)Defined at line 74 of file ../../third_party/llvm-libc/src/src/__support/ctype_utils.h
-
size_t strlcpy (char *__restrict dst, const char *__restrict src, size_t size)Defined at line 86 of file ../../third_party/llvm-libc/src/src/string/string_utils.h
-
size_t strlcpy (char *__restrict dst, const char *__restrict src, size_t size)Defined at line 86 of file ../../third_party/llvm-libc/src/src/string/string_utils.h
-
template <typename T, typename CharType>StrToNumResult<T> strtointeger (const CharType *__restrict src, int base, const size_t src_len)-----------------------------------------------------------------------------
**** WARNING ****
This interface is shared with libc++, if you change this interface you need
to update it in both libc and libc++.
-----------------------------------------------------------------------------
Takes a pointer to a string and the base to convert to. This function is used
as the backend for all of the string to int functions.
Defined at line 97 of file ../../third_party/llvm-libc/src/src/__support/str_to_integer.h
-
template <typename T, typename CharType>StrToNumResult<T> strtointeger (const CharType *__restrict src, int base, const size_t src_len)-----------------------------------------------------------------------------
**** WARNING ****
This interface is shared with libc++, if you change this interface you need
to update it in both libc and libc++.
-----------------------------------------------------------------------------
Takes a pointer to a string and the base to convert to. This function is used
as the backend for all of the string to int functions.
Defined at line 97 of file ../../third_party/llvm-libc/src/src/__support/str_to_integer.h
-
bool same_string (const char * lhs, const char * rhs)Defined at line 98 of file ../../third_party/llvm-libc/src/src/__support/common.h
-
bool isdigit (char ch)Defined at line 108 of file ../../third_party/llvm-libc/src/src/__support/ctype_utils.h
-
void * find_first_character (const unsigned char * src, unsigned char ch, size_t max_strlen)Returns the first occurrence of 'ch' within the first 'n' characters of
'src'. If 'ch' is not found, returns nullptr.
Defined at line 122 of file ../../third_party/llvm-libc/src/src/string/string_utils.h
-
void * find_first_character (const unsigned char * src, unsigned char ch, size_t max_strlen)Returns the first occurrence of 'ch' within the first 'n' characters of
'src'. If 'ch' is not found, returns nullptr.
Defined at line 122 of file ../../third_party/llvm-libc/src/src/string/string_utils.h
-
uint32_t log10_pow2 (uint64_t e)Returns floor(log_10(2^e)); requires 0
<
= e
<
= 42039.
Defined at line 125 of file ../../third_party/llvm-libc/src/src/__support/float_to_string.h
-
uint32_t log10_pow2 (uint64_t e)Returns floor(log_10(2^e)); requires 0
<
= e
<
= 42039.
Defined at line 125 of file ../../third_party/llvm-libc/src/src/__support/float_to_string.h
-
char tolower (char ch)Defined at line 126 of file ../../third_party/llvm-libc/src/src/__support/ctype_utils.h
-
uint32_t log2_pow5 (uint64_t e)Same as above, but with different constants.
Defined at line 151 of file ../../third_party/llvm-libc/src/src/__support/float_to_string.h
-
uint32_t log2_pow5 (uint64_t e)Same as above, but with different constants.
Defined at line 151 of file ../../third_party/llvm-libc/src/src/__support/float_to_string.h
-
uint32_t ceil_log10_pow2 (uint32_t e)Returns 1 + floor(log_10(2^e). This could technically be off by 1 if any
power of 2 was also a power of 10, but since that doesn't exist this is
always accurate. This is used to calculate the maximum number of base-10
digits a given e-bit number could have.
Defined at line 159 of file ../../third_party/llvm-libc/src/src/__support/float_to_string.h
-
uint32_t div_ceil (uint32_t num, uint32_t denom)Defined at line 163 of file ../../third_party/llvm-libc/src/src/__support/float_to_string.h
-
uint32_t length_for_num (uint32_t idx, uint32_t mantissa_width)Returns the maximum number of 9 digit blocks a number described by the given
index (which is ceil(exponent/16)) and mantissa width could need.
Defined at line 169 of file ../../third_party/llvm-libc/src/src/__support/float_to_string.h
-
template <size_t INT_SIZE>UInt<MID_INT_SIZE> get_table_positive (int exponent, size_t i)TODO: Fix long doubles (needs bigger table or alternate algorithm.)
Currently the table values are generated, which is very slow.
Defined at line 183 of file ../../third_party/llvm-libc/src/src/__support/float_to_string.h
-
template <size_t INT_SIZE>UInt<MID_INT_SIZE> get_table_positive (int exponent, size_t i)TODO: Fix long doubles (needs bigger table or alternate algorithm.)
Currently the table values are generated, which is very slow.
Defined at line 183 of file ../../third_party/llvm-libc/src/src/__support/float_to_string.h
-
char toupper (char ch)Defined at line 185 of file ../../third_party/llvm-libc/src/src/__support/ctype_utils.h
-
template <typename T>size_t string_length (const T * src)Defined at line 205 of file ../../third_party/llvm-libc/src/src/string/string_length.h
-
template <typename T>size_t string_length (const T * src)Defined at line 205 of file ../../third_party/llvm-libc/src/src/string/string_length.h
-
template <size_t INT_SIZE>UInt<MID_INT_SIZE> get_table_positive_df (int exponent, size_t i)Defined at line 221 of file ../../third_party/llvm-libc/src/src/__support/float_to_string.h
-
template <size_t INT_SIZE>UInt<MID_INT_SIZE> get_table_positive_df (int exponent, size_t i)Defined at line 221 of file ../../third_party/llvm-libc/src/src/__support/float_to_string.h
-
bool isalpha (char ch)Defined at line 244 of file ../../third_party/llvm-libc/src/src/__support/ctype_utils.h
-
template <size_t INT_SIZE>UInt<MID_INT_SIZE> get_table_negative (int exponent, size_t i)The formula for the table when i is negative (or zero) is as follows:
floor(10^(-9i) * 2^(c_0 - e)) % (10^9 * 2^c_0)
Since we know i is always negative, we just take it as unsigned and treat it
as negative. We do the same with exponent, while they're both always negative
in theory, in practice they're converted to positive for simpler
calculations.
The formula being used looks more like this:
floor(10^(9*(-i)) * 2^(c_0 + (-e))) % (10^9 * 2^c_0)
Defined at line 279 of file ../../third_party/llvm-libc/src/src/__support/float_to_string.h
-
template <size_t INT_SIZE>UInt<MID_INT_SIZE> get_table_negative (int exponent, size_t i)The formula for the table when i is negative (or zero) is as follows:
floor(10^(-9i) * 2^(c_0 - e)) % (10^9 * 2^c_0)
Since we know i is always negative, we just take it as unsigned and treat it
as negative. We do the same with exponent, while they're both always negative
in theory, in practice they're converted to positive for simpler
calculations.
The formula being used looks more like this:
floor(10^(9*(-i)) * 2^(c_0 + (-e))) % (10^9 * 2^c_0)
Defined at line 279 of file ../../third_party/llvm-libc/src/src/__support/float_to_string.h
-
bool isalnum (char ch)Defined at line 304 of file ../../third_party/llvm-libc/src/src/__support/ctype_utils.h
-
template <size_t INT_SIZE>UInt<MID_INT_SIZE> get_table_negative_df (int exponent, size_t i)Defined at line 331 of file ../../third_party/llvm-libc/src/src/__support/float_to_string.h
-
template <size_t INT_SIZE>UInt<MID_INT_SIZE> get_table_negative_df (int exponent, size_t i)Defined at line 331 of file ../../third_party/llvm-libc/src/src/__support/float_to_string.h
-
uint32_t mul_shift_mod_1e9 (const FPBits::StorageType mantissa, const UInt<MID_INT_SIZE> & large, const int32_t shift_amount)Defined at line 375 of file ../../third_party/llvm-libc/src/src/__support/float_to_string.h
-
uint32_t mul_shift_mod_1e9 (const FPBits::StorageType mantissa, const UInt<MID_INT_SIZE> & large, const int32_t shift_amount)Defined at line 375 of file ../../third_party/llvm-libc/src/src/__support/float_to_string.h
-
int b36_char_to_int (char ch)Defined at line 375 of file ../../third_party/llvm-libc/src/src/__support/ctype_utils.h
-
bool islower (wchar_t wch)Defined at line 459 of file ../../third_party/llvm-libc/src/src/__support/wctype_utils.h
-
bool isupper (wchar_t wch)Defined at line 470 of file ../../third_party/llvm-libc/src/src/__support/wctype_utils.h
-
bool isdigit (wchar_t wch)Defined at line 481 of file ../../third_party/llvm-libc/src/src/__support/wctype_utils.h
-
bool isalpha (wchar_t wch)Defined at line 486 of file ../../third_party/llvm-libc/src/src/__support/wctype_utils.h
-
char int_to_b36_char (int num)Defined at line 493 of file ../../third_party/llvm-libc/src/src/__support/ctype_utils.h
-
bool isalnum (wchar_t wch)Defined at line 497 of file ../../third_party/llvm-libc/src/src/__support/wctype_utils.h
-
bool isspace (wchar_t wch)Defined at line 509 of file ../../third_party/llvm-libc/src/src/__support/wctype_utils.h
-
bool isblank (wchar_t wch)Defined at line 520 of file ../../third_party/llvm-libc/src/src/__support/wctype_utils.h
-
bool isgraph (wchar_t wch)Defined at line 531 of file ../../third_party/llvm-libc/src/src/__support/wctype_utils.h
-
bool isprint (wchar_t wch)Defined at line 544 of file ../../third_party/llvm-libc/src/src/__support/wctype_utils.h
-
bool isxdigit (wchar_t wch)Defined at line 555 of file ../../third_party/llvm-libc/src/src/__support/wctype_utils.h
-
bool iscntrl (wchar_t wch)Defined at line 560 of file ../../third_party/llvm-libc/src/src/__support/wctype_utils.h
-
bool ispunct (wchar_t wch)Defined at line 571 of file ../../third_party/llvm-libc/src/src/__support/wctype_utils.h
-
bool isspace (char ch)Defined at line 576 of file ../../third_party/llvm-libc/src/src/__support/ctype_utils.h
-
wchar_t tolower (wchar_t wch)Defined at line 582 of file ../../third_party/llvm-libc/src/src/__support/wctype_utils.h
-
bool isgraph (char ch)not yet encoding independent.
Defined at line 591 of file ../../third_party/llvm-libc/src/src/__support/ctype_utils.h
-
wchar_t toupper (wchar_t wch)Defined at line 594 of file ../../third_party/llvm-libc/src/src/__support/wctype_utils.h
-
bool is_char_or_wchar (char ch, char c_value, wchar_t )An overload which provides a way to compare input with specific character
values, when input can be of a regular or a wide character type.
Defined at line 595 of file ../../third_party/llvm-libc/src/src/__support/ctype_utils.h
-
int b36_char_to_int (wchar_t wch)Defined at line 606 of file ../../third_party/llvm-libc/src/src/__support/wctype_utils.h