[PATCH] D139720: [clang][PPC] Checking Unknown Values Passed to -mcpu
Qiongsi Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 12 12:26:04 PST 2022
qiongsiwu1 added a comment.
In D139720#3989651 <https://reviews.llvm.org/D139720#3989651>, @jamieschmeiser wrote:
> I'm fine with handling the return for common as a separate change, if necessary.
Sounds good! In this case I will fix it in a different patch once we decide what exactly to do for the `-mcpu=common` case.
> Is the error produced now because it passes back the incorrect option rather than quietly changing it to something appropriate as it did before?
Yes precisely. When a `TargetInfo` is created, we have this <https://github.com/llvm/llvm-project/blob/4c3357ad56a0f5f85dfcadc83f719b09954d43fa/clang/lib/Basic/Targets.cpp#L711> code that checks the validity of the CPU string. Currently, we silently change anything weird to something reasonable and use it to create the `TargetInfo`. This patch removes that filtering and pass on the incorrect CPU string so we can catch the error.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139720/new/
https://reviews.llvm.org/D139720
More information about the cfe-commits
mailing list