[PATCH] D137756: [z/OS][pg] Throw error when using -pg on z/OS
Michael Francis via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 9 08:14:34 PST 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGec094d259ecf: [z/OS][pg] Throw error when using -pg on z/OS (authored by francii).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137756/new/
https://reviews.llvm.org/D137756
Files:
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/zos-profiling-error.c
Index: clang/test/Driver/zos-profiling-error.c
===================================================================
--- /dev/null
+++ clang/test/Driver/zos-profiling-error.c
@@ -0,0 +1,2 @@
+// RUN: %clang 2>&1 -### --target=s390x-none-zos -pg -S %s | FileCheck -check-prefix=FAIL-PG-NAME %s
+// FAIL-PG-NAME: error: unsupported option '-pg' for target 's390x-none-zos'
Index: clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -6338,6 +6338,12 @@
<< A->getAsString(Args) << TripleStr;
}
}
+ if (Arg *A = Args.getLastArgNoClaim(options::OPT_pg)) {
+ if (TC.getTriple().isOSzOS()) {
+ D.Diag(diag::err_drv_unsupported_opt_for_target)
+ << A->getAsString(Args) << TripleStr;
+ }
+ }
if (Args.getLastArg(options::OPT_fapple_kext) ||
(Args.hasArg(options::OPT_mkernel) && types::isCXX(InputType)))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137756.496138.patch
Type: text/x-patch
Size: 988 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230209/e81a4db4/attachment-0001.bin>
More information about the cfe-commits
mailing list