[all-commits] [llvm/llvm-project] 59848b: [Clang][AIX][p] Manually Claim -p in front end
Michael Francis via All-commits
all-commits at lists.llvm.org
Sat Mar 11 23:34:35 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 59848b9ebae6a92a4342b1e8aa32feaf5c9c4b51
https://github.com/llvm/llvm-project/commit/59848b9ebae6a92a4342b1e8aa32feaf5c9c4b51
Author: Michael Francis <michaelfrancis at ibm.com>
Date: 2023-03-12 (Sun, 12 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