[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
Tue Feb 7 09:04:31 PST 2023
francii updated this revision to Diff 495570.
francii added a comment.
Update test case verbosity
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
@@ -6336,6 +6336,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.495570.patch
Type: text/x-patch
Size: 988 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230207/d801f5a8/attachment-0001.bin>
More information about the cfe-commits
mailing list