[clang] [llvm] [Clang][LoongArch] Support target attribute for function (PR #140700)

via cfe-commits cfe-commits at lists.llvm.org
Wed May 28 20:22:01 PDT 2025


================
@@ -34,6 +34,19 @@ bool LoongArch::isValidArchName(StringRef Arch) {
   return false;
 }
 
+bool LoongArch::isValidFeatureName(StringRef Feature) {
+  if (Feature.starts_with("+") || Feature.starts_with("-")) {
+    return false;
+  }
+  for (const auto F : AllFeatures) {
+    StringRef CanonicalName =
----------------
wangleiat wrote:

Beware unnecessary copies.
`auto &F`

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


More information about the cfe-commits mailing list