[compiler-rt] Allow to override allocation buffer size with a separate env var (PR #71703)

via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 09:21:08 PST 2023


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 34f83e86b4b70427969439683360a819a13e6f49 e58dcb6726532cc81b101547e4a5fe2080ea4340 -- compiler-rt/lib/scudo/standalone/flags.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/compiler-rt/lib/scudo/standalone/flags.cpp b/compiler-rt/lib/scudo/standalone/flags.cpp
index a3095d4f655f..ab0472f319bd 100644
--- a/compiler-rt/lib/scudo/standalone/flags.cpp
+++ b/compiler-rt/lib/scudo/standalone/flags.cpp
@@ -69,8 +69,8 @@ void initFlags() {
   Parser.parseString(getCompileDefinitionScudoDefaultOptions());
   Parser.parseString(getScudoDefaultOptions());
   Parser.parseString(getEnv("SCUDO_OPTIONS"));
-  if (const char* V = getEnv("SCUDO_ALLOCATION_RING_BUFFER_SIZE")) {
-    char* End = nullptr;
+  if (const char *V = getEnv("SCUDO_ALLOCATION_RING_BUFFER_SIZE")) {
+    char *End = nullptr;
     int I = static_cast<int>(strtol(V, &End, 10));
     if (End && *End == '\0') {
       F->allocation_ring_buffer_size = I;

``````````

</details>


https://github.com/llvm/llvm-project/pull/71703


More information about the llvm-commits mailing list