[libc-commits] [libc] [libc] Include algorithm.h to parser.h (PR #87125)
via libc-commits
libc-commits at lists.llvm.org
Fri Mar 29 16:22:46 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Caslyn Tonelli (Caslyn)
<details>
<summary>Changes</summary>
This includes algorithm.h directly to provide the definition for `cpp:max` in parser.h. This will define `max(...)` in the libc namespace for build systems that pull in parser.h explicitly.
---
Full diff: https://github.com/llvm/llvm-project/pull/87125.diff
1 Files Affected:
- (modified) libc/src/stdio/printf_core/parser.h (+1)
``````````diff
diff --git a/libc/src/stdio/printf_core/parser.h b/libc/src/stdio/printf_core/parser.h
index 8e8c77e219fa4d..eda978a83ea8af 100644
--- a/libc/src/stdio/printf_core/parser.h
+++ b/libc/src/stdio/printf_core/parser.h
@@ -10,6 +10,7 @@
#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_PARSER_H
#include "include/llvm-libc-macros/stdfix-macros.h"
+#include "src/__support/CPP/algorithm.h" // max
#include "src/__support/CPP/optional.h"
#include "src/__support/CPP/type_traits.h"
#include "src/__support/str_to_integer.h"
``````````
</details>
https://github.com/llvm/llvm-project/pull/87125
More information about the libc-commits
mailing list