[PATCH] D139720: [clang][PPC] Checking Unknown Values Passed to -mcpu
Qiongsi Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 9 08:26:53 PST 2022
qiongsiwu1 created this revision.
qiongsiwu1 added reviewers: nemanjai, amyk.
qiongsiwu1 added a project: clang.
Herald added subscribers: shchenz, kbarton.
Herald added a project: All.
qiongsiwu1 requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay.
Currently `ppc::getPPCTargetCPU` returns an empty string when it encounters an unknown value passed to `-mcpu`. This causes `clang` to ignore unknown `-mcpu` values silently.
This patch changes the behaviour of `ppc::getPPCTargetCPU` so that it passes the unknown option to the backend, so the backend can actually check if the CPU string is supported, and report an error when encountering unknown/unsupported CPU string.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D139720
Files:
clang/lib/Driver/ToolChains/Arch/PPC.cpp
clang/lib/Driver/ToolChains/Arch/PPC.h
clang/lib/Driver/ToolChains/CommonArgs.cpp
clang/test/Driver/ppc-cpus.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139720.481663.patch
Type: text/x-patch
Size: 7033 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221209/4869b39b/attachment.bin>
More information about the cfe-commits
mailing list