[all-commits] [llvm/llvm-project] ac1d14: [Clang][AIX][p] Manually Claim -p in front end
Michael Francis via All-commits
all-commits at lists.llvm.org
Wed Mar 15 16:28:35 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ac1d143b0ef924cf2725bb36537f18ae2c7f9c4f
https://github.com/llvm/llvm-project/commit/ac1d143b0ef924cf2725bb36537f18ae2c7f9c4f
Author: Michael Francis <michaelfrancis at ibm.com>
Date: 2023-03-15 (Wed, 15 Mar 2023)
Changed paths:
M clang/lib/Driver/ToolChains/AIX.cpp
M clang/lib/Driver/ToolChains/Clang.cpp
A clang/test/Driver/ibm-profiling.c
R clang/test/Driver/zos-profiling-error.c
Log Message:
-----------
[Clang][AIX][p] Manually Claim -p in front end
The current implementation of `-p` does not claim the argument once it
is passed. Since it pushes `-pg` directly, it is only ever referred to
again when linking. As a result, when compiling with `-S`, the compiler
warns that `-p` goes unused even though that is not the case.
With this patch, if both `-p` and `-pg` are passed, the argument that is
passed second will take precedence. `-p` will still throw an error on
unsupported platforms, regardless of precedence.
This revision includes a test case, which has been placed in
`clang/test/Driver/zos-profiling-error.c`. As a result,
`zos-profiling-error.c` has been renamed to `ibm-profiling.c`. This
revision also passes `clang/test/Driver/aix-ld.c`.
Differential Revision: https://reviews.llvm.org/D145021
More information about the All-commits
mailing list