[clang] [llvm] [Clang][LoongArch] Support target attribute for function (PR #140700)
via cfe-commits
cfe-commits at lists.llvm.org
Wed May 28 00:46:31 PDT 2025
================
@@ -3195,6 +3195,17 @@ bool Sema::checkTargetAttr(SourceLocation LiteralLoc, StringRef AttrStr) {
}
}
+ if (Context.getTargetInfo().getTriple().isLoongArch()) {
+ for (const auto &Feature : ParsedAttrs.Features) {
+ StringRef CurFeature = Feature;
+ if (CurFeature.starts_with("!arch=")) {
----------------
wangleiat wrote:
According to `LoongArchTargetInfo::parseTargetAttr()`, this condition may always be false.
https://github.com/llvm/llvm-project/pull/140700
More information about the cfe-commits
mailing list