[clang] [Clang][RISCV] Recognize unsupport target feature by supporting... (PR #106495)

Kito Cheng via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 28 23:55:43 PDT 2024


================
@@ -391,7 +391,14 @@ void RISCVTargetInfo::fillValidTuneCPUList(
 
 static void handleFullArchString(StringRef FullArchStr,
                                  std::vector<std::string> &Features) {
-  Features.push_back("__RISCV_TargetAttrNeedOverride");
+
+  // Should be full arch string.
+  if (!FullArchStr.starts_with("rv")) {
+    Features.push_back(FullArchStr.str());
----------------
kito-cheng wrote:

I am little confused about this part, comment say it should be full arch string, but the check come with `!`?

https://github.com/llvm/llvm-project/pull/106495


More information about the cfe-commits mailing list