This patch enables -p functionality into Clang on AIX and Linux
To create parity with GCC.
The purpose of the -p flag is similar to that of -pg, but the
results are analyzed with the prof tool as opposed to the gprof tool.
More details can be found in this RFC post:
https://discourse.llvm.org/t/rfc-add-p-driver-support-to-clang/66013?u=francii
On AIX, compiling with -p links against mcrt0.o
and produces a mon.out file analyzed with the prof tool,
while -pg links against gcrt0.o and produces a gmon.outfile
analyzed with the gprof tool. The differences are therefore
only a concern when linking, so calling -p will push -pg to cc1.
An AIX test for -p already exists, and I recently
another test was added here:
https://github.com/llvm/llvm-project/commit/dc9846ce988b9ddfcbc42cd462d5d94b634b3161
As such, there is no AIX test case attached to this patch.
Why is this a cc1 option if it's not used in CC1?