[PATCH] D124857: [AIX][PGO] Enable linux style PGO on AIX

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 4 11:03:48 PDT 2022


MaskRay accepted this revision.
MaskRay added inline comments.


================
Comment at: compiler-rt/lib/profile/InstrProfilingPlatformLinux.c:253
+// variables in each of the above 3 sections.
+COMPILER_RT_VISIBILITY int dummy_cnts[0] COMPILER_RT_SECTION(
+    COMPILER_RT_SEG INSTR_PROF_CNTS_SECT_NAME);
----------------
w2yehia wrote:
> MaskRay wrote:
> > This has a -Wzero-length-array warning in -pedantic mode.
> sorry but what's the correct way to resolve this on all platforms?
> I see -Wno-pedantic is used when building this file `if(FUCHSIA OR UNIX)`. Should I add `-Wno-pedantic` if such flag is supported by the build compiler in general?
Many people don't build AIX so this isn't a problem for them (most build bots).

If you want suppress the warning for the AIX specific code, you may use
```
#pragma GCC diagnostic ignored "-Wpedantic"
```
This works with both GCC and Clang. I do not know how IBM XL/C behaves.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124857/new/

https://reviews.llvm.org/D124857



More information about the llvm-commits mailing list