[compiler-rt] [compiler-rt] Move `endif` to correct place (PR #100342)
Dmitry Chestnykh via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 24 03:50:21 PDT 2024
https://github.com/chestnykh updated https://github.com/llvm/llvm-project/pull/100342
>From 05466ce2fcd5e05000e928166cf0474cbcd043e9 Mon Sep 17 00:00:00 2001
From: Dmitry Chestnykh <dm.chestnykh at gmail.com>
Date: Wed, 24 Jul 2024 13:43:37 +0300
Subject: [PATCH 1/4] [compiler-rt] Move `endif` to correct place
A couple of previous commits leaded to wrong endif
placement inside the source that caused build problem in
https://lab.llvm.org/buildbot/#/builders/13/builds/1020
See #99613 #99049
---
compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
index bc2cb247f2a8a..afb6693017740 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
@@ -2239,6 +2239,7 @@ static const char *RegNumToRegName(int reg) {
# endif
default:
return NULL;
+#endif
}
return NULL;
}
@@ -2302,7 +2303,6 @@ static void DumpSingleReg(ucontext_t *ctx, int RegNum) {
(void)RegName;
# endif
}
-# endif
void SignalContext::DumpAllRegisters(void *context) {
ucontext_t *ucontext = (ucontext_t *)context;
>From 9c575d0a1bfb6993767ae071c882e6d9cfdbe154 Mon Sep 17 00:00:00 2001
From: Dmitry Chestnykh <dm.chestnykh at gmail.com>
Date: Wed, 24 Jul 2024 13:46:40 +0300
Subject: [PATCH 2/4] [compiler-rt] Adjust code style
---
compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
index afb6693017740..3d24a2a6a6272 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
@@ -2239,7 +2239,7 @@ static const char *RegNumToRegName(int reg) {
# endif
default:
return NULL;
-#endif
+# endif
}
return NULL;
}
>From a922f8596be00a0a5e0af4751b13cf99492dad57 Mon Sep 17 00:00:00 2001
From: Dmitry Chestnykh <dm.chestnykh at gmail.com>
Date: Wed, 24 Jul 2024 13:49:10 +0300
Subject: [PATCH 3/4] [compiler-rt] Add comment about `#endif` belonging
---
compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
index 3d24a2a6a6272..8bbcd52e9ac13 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
@@ -2239,7 +2239,7 @@ static const char *RegNumToRegName(int reg) {
# endif
default:
return NULL;
-# endif
+# endif // SANITIZER_LINUX
}
return NULL;
}
>From ab12125bcb04ef9dfefd2986cd7cda52a5cdc4ad Mon Sep 17 00:00:00 2001
From: Dmitry Chestnykh <dm.chestnykh at gmail.com>
Date: Wed, 24 Jul 2024 13:52:00 +0300
Subject: [PATCH 4/4] [compiler-rt] Use default case for non-linux sanitizer
---
compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
index 8bbcd52e9ac13..8b1affb0a048d 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
@@ -2237,9 +2237,9 @@ static const char *RegNumToRegName(int reg) {
case 31:
return "sp";
# endif
+# endif // SANITIZER_LINUX
default:
return NULL;
-# endif // SANITIZER_LINUX
}
return NULL;
}
More information about the llvm-commits
mailing list