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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to