[all-commits] [llvm/llvm-project] 1fdbe5: [clang][PPC] Checking Unknown Values Passed to -mcpu
Qiongsi Wu via All-commits
all-commits at lists.llvm.org
Tue Dec 13 07:20:00 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1fdbe5c573b920f00e5bfdbcea0e837833ae77a0
https://github.com/llvm/llvm-project/commit/1fdbe5c573b920f00e5bfdbcea0e837833ae77a0
Author: Qiongsi Wu <qiongsiwu at gmail.com>
Date: 2022-12-13 (Tue, 13 Dec 2022)
Changed paths:
M clang/lib/Driver/ToolChains/Arch/PPC.cpp
M clang/lib/Driver/ToolChains/Arch/PPC.h
M clang/lib/Driver/ToolChains/CommonArgs.cpp
M clang/test/Driver/ppc-cpus.c
Log Message:
-----------
[clang][PPC] Checking Unknown Values Passed to -mcpu
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 target info, so the target info can actually check if the CPU string is supported, and report an error when encountering unknown/unsupported CPU string.
Reviewed By: jamieschmeiser
Differential Revision: https://reviews.llvm.org/D139720
More information about the All-commits
mailing list