Skip to content

Commit af39acc

Browse files
authored
Sprinkle LLVM_READONLY/READNONE on a few DeclAttribute accessors (#19237)
No intended functionality change. Probably no performance change either, but might as well.
1 parent d86d972 commit af39acc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/swift/AST/Attr.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ class DeclAttribute : public AttributeBase {
335335
UserInaccessible = 1ull << (unsigned(DeclKindIndex::Last_Decl) + 7),
336336
};
337337

338+
LLVM_READNONE
338339
static uint64_t getOptions(DeclAttrKind DK);
339340

340341
uint64_t getOptions() const {
@@ -386,6 +387,7 @@ class DeclAttribute : public AttributeBase {
386387
return canAttributeAppearOnDecl(getKind(), D);
387388
}
388389

390+
LLVM_READONLY
389391
static bool canAttributeAppearOnDecl(DeclAttrKind DK, const Decl *D);
390392

391393
/// Returns true if multiple instances of an attribute kind
@@ -439,6 +441,7 @@ class DeclAttribute : public AttributeBase {
439441
return isNotSerialized(getKind());
440442
}
441443

444+
LLVM_READNONE
442445
static bool canAttributeAppearOnDeclKind(DeclAttrKind DAK, DeclKind DK);
443446

444447
/// Returns the source name of the attribute, without the @ or any arguments.

0 commit comments

Comments
 (0)