[libc-commits] [PATCH] D131993: [libc] add compile option for printf arg type array

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Aug 17 00:04:23 PDT 2022


sivachandra added inline comments.


================
Comment at: libc/src/stdio/printf_core/parser.h:51
+// penalty for not having enough space is severe.
+#ifndef LLVM_LIBC_PRINTF_INDEX_ARR_LEN
+  static constexpr size_t DESC_ARR_LEN = 128;
----------------
Normally, config params like this are all put in one single `.h` file, say in this `printf_parser_config.h`:

```
#ifndef LLVM_LIBC_PRINTF_INDEX_ARR_LEN
// Explain what this param is about.
#define LLVM_LIBC_PRINTF_INDEX_ARR_LEN 128
#endif
```

Include `printf_parser_config.h` in parser.h. Not sure if we really want a separate config file for the parser, may be just a `printf_config.h` file is sufficient.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131993/new/

https://reviews.llvm.org/D131993



More information about the libc-commits mailing list