aboutsummaryrefslogtreecommitdiff
path: root/compiler-rt
diff options
context:
space:
mode:
authorJake Egan <5326451+jakeegan@users.noreply.github.com>2023-07-19 13:50:33 -0400
committerJake Egan <5326451+jakeegan@users.noreply.github.com>2023-07-19 13:50:55 -0400
commit0680ca7f8c388bd929843badea04a4b4c3aa95e0 (patch)
tree6df49d66c75e2529a522d44932bebb1af2a2da51 /compiler-rt
parent67399932c767f0a64c83a500dc6f7806c09d9401 (diff)
downloadllvm-0680ca7f8c388bd929843badea04a4b4c3aa95e0.zip
llvm-0680ca7f8c388bd929843badea04a4b4c3aa95e0.tar.gz
llvm-0680ca7f8c388bd929843badea04a4b4c3aa95e0.tar.bz2
[InstrProf][NFC] Ignore -Wcast-qual after D153911 to fix build failure on AIX
/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/compiler-rt/lib/profile/InstrProfilingPlatformAIX.c:202:40: error: cast from 'const int (*)[0]' to 'void *' drops const qualifier [-Werror,-Wcast-qual] (void *)&dummy_name, (void *)&dummy_vnds}; ^ 1 error generated.
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/lib/profile/InstrProfilingPlatformAIX.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler-rt/lib/profile/InstrProfilingPlatformAIX.c b/compiler-rt/lib/profile/InstrProfilingPlatformAIX.c
index 6e12fb9..63219da 100644
--- a/compiler-rt/lib/profile/InstrProfilingPlatformAIX.c
+++ b/compiler-rt/lib/profile/InstrProfilingPlatformAIX.c
@@ -197,8 +197,14 @@ static int dummy_vnds[0] COMPILER_RT_SECTION(
// To avoid GC'ing of the dummy variables by the linker, reference them in an
// array and reference the array in the runtime registration code
// (InstrProfilingRuntime.cpp)
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wcast-qual"
+#endif
COMPILER_RT_VISIBILITY
void *__llvm_profile_keep[] = {(void *)&dummy_cnts, (void *)&dummy_data,
(void *)&dummy_name, (void *)&dummy_vnds};
-
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
#endif