[compiler-rt] [scudo] Make comment compatible with gcc (PR #106137)
Caslyn Tonelli via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 26 14:25:41 PDT 2024
https://github.com/Caslyn updated https://github.com/llvm/llvm-project/pull/106137
>From 044786ad9ed1bbe045b3990310c5de218ee1b0cf Mon Sep 17 00:00:00 2001
From: Caslyn Tonelli <caslyn at google.com>
Date: Mon, 26 Aug 2024 13:35:10 -0700
Subject: [PATCH 1/2] [scudo] Make comment compatible with gcc
gcc interprets a backslash '\' as the last char before a new line as a
line continuation character, even in a comment context. This can
produce an "error: multi-line comment [-Werror=comment]".
This PR places an innocuous '.' following the '\' so that the comment
can compile with gcc.
---
compiler-rt/lib/scudo/standalone/secondary.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler-rt/lib/scudo/standalone/secondary.h b/compiler-rt/lib/scudo/standalone/secondary.h
index 985e2392641ae2..0690cb65b68468 100644
--- a/compiler-rt/lib/scudo/standalone/secondary.h
+++ b/compiler-rt/lib/scudo/standalone/secondary.h
@@ -426,7 +426,7 @@ class MapAllocatorCache {
// The difference between the retrieved memory chunk and the request
// size is at most MaxAllowedFragmentedPages
//
- // / MaxAllowedFragmentedPages * PageSize \
+ // / MaxAllowedFragmentedPages * PageSize \.
// +--------------------------+-------------+
// | | |
// +--------------------------+-------------+
>From bbbfa36065ff6bd0b634ee7972c595fc390193c7 Mon Sep 17 00:00:00 2001
From: Caslyn Tonelli <caslyn at google.com>
Date: Mon, 26 Aug 2024 14:25:17 -0700
Subject: [PATCH 2/2] Amend delimiters
---
compiler-rt/lib/scudo/standalone/secondary.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler-rt/lib/scudo/standalone/secondary.h b/compiler-rt/lib/scudo/standalone/secondary.h
index 0690cb65b68468..fba21c3cb6a09d 100644
--- a/compiler-rt/lib/scudo/standalone/secondary.h
+++ b/compiler-rt/lib/scudo/standalone/secondary.h
@@ -426,7 +426,7 @@ class MapAllocatorCache {
// The difference between the retrieved memory chunk and the request
// size is at most MaxAllowedFragmentedPages
//
- // / MaxAllowedFragmentedPages * PageSize \.
+ // +- MaxAllowedFragmentedPages * PageSize -+
// +--------------------------+-------------+
// | | |
// +--------------------------+-------------+
More information about the llvm-commits
mailing list