[compiler-rt] [msan] Change #ifdef SANITIZER_PPC to #if (PR #94009)

Thurston Dang via llvm-commits llvm-commits at lists.llvm.org
Fri May 31 12:17:44 PDT 2024


https://github.com/thurstond created https://github.com/llvm/llvm-project/pull/94009

https://github.com/llvm/llvm-project/commit/0e96eebc7f681a7ce41f35909e609c7c61a11455 accidentally turned the prior patch (https://github.com/llvm/llvm-project/commit/57a507930b50c445140feb68bffe1c21af53319e) into a no-op because this macro is always defined (as either 1 or 0). This patch changes it to correctly use #if.

>From 283ef21c91d34c3890bfe85b6c09055e49ba7af9 Mon Sep 17 00:00:00 2001
From: Thurston Dang <thurston at google.com>
Date: Fri, 31 May 2024 19:13:55 +0000
Subject: [PATCH] [msan] Change #ifdef SANITIZER_PPC to #if

https://github.com/llvm/llvm-project/commit/0e96eebc7f681a7ce41f35909e609c7c61a11455,
accidentally turned the prior patch into a no-op because this macro is always defined (as either 1 or 0).
This patch changes it to correctly use #if.
---
 compiler-rt/lib/msan/msan.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler-rt/lib/msan/msan.cpp b/compiler-rt/lib/msan/msan.cpp
index 9375e27d4f4d2..b04a72595b93d 100644
--- a/compiler-rt/lib/msan/msan.cpp
+++ b/compiler-rt/lib/msan/msan.cpp
@@ -104,7 +104,7 @@ int msan_report_count = 0;
 // in some configurations (e.g., "relocation R_X86_64_PC32 out of range:
 // ... is not in [-2147483648, 2147483647]; references section '.bss'").
 // We use kNumStackOriginDescrs * (sizeof(char*) + sizeof(uptr)) == 64MB.
-#ifdef SANITIZER_PPC
+#if SANITIZER_PPC
 // soft_rss_limit test (release_origin.c) fails on PPC if kNumStackOriginDescrs
 // is too high
 static const uptr kNumStackOriginDescrs = 1 * 1024 * 1024;



More information about the llvm-commits mailing list