SSiva Chandra Reddy[libc] Add a simple StringStream class.
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[libc] Add a simple StringStream class. This class will be used in future changes to construct simple strings. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D130334 | 3 年前 | |
[libc] fix line buffered empty file writes Previously, any line buffered write of size 0 would cause an error. The variable used to track the index of the last newline started at the size of the write - 1, which underflowed. Now it's handled properly, and a test has been added to prevent regressions. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D127914 | 3 年前 | |
[libc] Implement FLAGS option for generating all combinations for targets. Add FLAGS option for add_header_library, add_object_library, add_entrypoint_object, and add_libc_unittest. In general, a flag is a string provided for supported functions under the multi-valued option FLAGS. It should be one of the following forms: FLAG_NAME FLAG_NAME__NO FLAG_NAME__ONLY A target will inherit all the flags of its upstream dependency. When we create a target TARGET_NAME with a flag using (add_header_library, add_object_library, ...), its behavior will depend on the flag form as follow: - FLAG_NAME: The following 2 targets will be generated: TARGET_NAME that has FLAG_NAME in its FLAGS property. TARGET_NAME.__NO_FLAG_NAME that depends on DEP.__NO_FLAG_NAME if TARGET_NAME depends on DEP and DEP has FLAG_NAME in its FLAGS property. - FLAG_NAME__ONLY: Only generate 1 target TARGET_NAME that has FLAG_NAME in its FLAGS property. - FLAG_NAME__NO: Only generate 1 target TARGET_NAME.__NO_FLAG_NAME that depends on DEP.__NO_FLAG_NAME if DEP is in its DEPENDS list and DEP has FLAG_NAME in its FLAGS property. To show all the targets generated, pass SHOW_INTERMEDIATE_OBJECTS=ON to cmake. To show all the targets' dependency and flags, pass SHOW_INTERMEDIATE_OBJECTS=DEPS to cmake. To completely disable a flag FLAG_NAME expansion, set the variable SKIP_FLAG_EXPANSION_FLAG_NAME=TRUE. Reviewed By: michaelrj, sivachandra Differential Revision: https://reviews.llvm.org/D125174 | 4 年前 | |
[libc] Add a convenience class and function for integer to string conversion. Printf's integer converter has been modified to use the new converter. In future, it will be used to implement other parts of the libc. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D130227 | 3 年前 | |
[libc] Add holder class for va_lists This class is intended to be used in cases where a class is being used on a va_list. It provides destruction and copy semantics with small overhead. This is intended to be used in printf. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D123061 | 4 年前 | |
[libc] apply new lint rules This patch applies the lint rules described in the previous patch. There was also a significant amount of effort put into manually fixing things, since all of the templated functions, or structs defined in /spec, were not updated and had to be handled manually. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D114302 | 4 年前 | |
[libc] Add Uint128 type as a fallback when __uint128_t is not available. Also, the unused specializations of __int128_t have been removed. Differential Revision: https://reviews.llvm.org/D128304 | 3 年前 | |
[libc] Add a convenience class and function for integer to string conversion. Printf's integer converter has been modified to use the new converter. In future, it will be used to implement other parts of the libc. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D130227 | 3 年前 | |
[libc] add atof, strtof and strtod Add the string to floating point conversion functions. Long doubles aren't supported yet, but floats and doubles are. The primary algorithm used is the Eisel-Lemire ParseNumberF64 algorithm, with the Simple Decimal Conversion algorithm as backup. Links for more information on the algorithms: Number Parsing at a Gigabyte per Second, Software: Practice and Experience 51 (8), 2021 (https://arxiv.org/abs/2101.11408) https://nigeltao.github.io/blog/2020/eisel-lemire.html https://nigeltao.github.io/blog/2020/parse-number-f64-simple.html Differential Revision: https://reviews.llvm.org/D109261 | 4 年前 | |
[libc] add atof, strtof and strtod Add the string to floating point conversion functions. Long doubles aren't supported yet, but floats and doubles are. The primary algorithm used is the Eisel-Lemire ParseNumberF64 algorithm, with the Simple Decimal Conversion algorithm as backup. Links for more information on the algorithms: Number Parsing at a Gigabyte per Second, Software: Practice and Experience 51 (8), 2021 (https://arxiv.org/abs/2101.11408) https://nigeltao.github.io/blog/2020/eisel-lemire.html https://nigeltao.github.io/blog/2020/parse-number-f64-simple.html Differential Revision: https://reviews.llvm.org/D109261 | 4 年前 | |
[libc] Add Uint128 type as a fallback when __uint128_t is not available. Also, the unused specializations of __int128_t have been removed. Differential Revision: https://reviews.llvm.org/D128304 | 3 年前 | |
[libc] Add compound assignment and pre-increment operators to UInt. | 3 年前 |