aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Parse/ParseTentative.cpp
diff options
context:
space:
mode:
authorSander de Smalen <sander.desmalen@arm.com>2024-01-15 09:41:32 +0000
committerGitHub <noreply@github.com>2024-01-15 09:41:32 +0000
commit8e7f073eb42c92aa7a2b651ca314d7fcebf296e3 (patch)
tree1b6b5ddd8c7c88a0228b65dcdb4f0ffec8639e1f /clang/lib/Parse/ParseTentative.cpp
parent06e3abcb54f339edc2ba757cfa947e024677b21e (diff)
downloadllvm-8e7f073eb42c92aa7a2b651ca314d7fcebf296e3.zip
llvm-8e7f073eb42c92aa7a2b651ca314d7fcebf296e3.tar.gz
llvm-8e7f073eb42c92aa7a2b651ca314d7fcebf296e3.tar.bz2
[Clang][AArch64] Change SME attributes for shared/new/preserved state. (#76971)
This patch replaces the `__arm_new_za`, `__arm_shared_za` and `__arm_preserves_za` attributes in favour of: * `__arm_new("za")` * `__arm_in("za")` * `__arm_out("za")` * `__arm_inout("za")` * `__arm_preserves("za")` As described in https://github.com/ARM-software/acle/pull/276. One change is that `__arm_in/out/inout/preserves(S)` are all mutually exclusive, whereas previously it was fine to write `__arm_shared_za __arm_preserves_za`. This case is now represented with `__arm_in("za")`. The current implementation uses the same LLVM attributes under the hood, since `__arm_in/out/inout` are all variations of "shared ZA", so can use the existing `aarch64_pstate_za_shared` attribute in LLVM. #77941 will add support for the new "zt0" state as introduced with SME2.
Diffstat (limited to 'clang/lib/Parse/ParseTentative.cpp')
-rw-r--r--clang/lib/Parse/ParseTentative.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseTentative.cpp b/clang/lib/Parse/ParseTentative.cpp
index 242741c1..5bfabf5 100644
--- a/clang/lib/Parse/ParseTentative.cpp
+++ b/clang/lib/Parse/ParseTentative.cpp
@@ -894,7 +894,8 @@ bool Parser::TrySkipAttributes() {
// Note that explicitly checking for `[[` and `]]` allows to fail as
// expected in the case of the Objective-C message send syntax.
ConsumeBracket();
- } else if (Tok.isRegularKeywordAttribute()) {
+ } else if (Tok.isRegularKeywordAttribute() &&
+ !doesKeywordAttributeTakeArgs(Tok.getKind())) {
ConsumeToken();
} else {
ConsumeToken();