Skip to content

Sprinkle LLVM_READONLY/READNONE on a few DeclAttribute accessors #19237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 11, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/swift/AST/Attr.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ class DeclAttribute : public AttributeBase {
UserInaccessible = 1ull << (unsigned(DeclKindIndex::Last_Decl) + 7),
};

LLVM_READNONE
static uint64_t getOptions(DeclAttrKind DK);

uint64_t getOptions() const {
Expand Down Expand Up @@ -386,6 +387,7 @@ class DeclAttribute : public AttributeBase {
return canAttributeAppearOnDecl(getKind(), D);
}

LLVM_READONLY
static bool canAttributeAppearOnDecl(DeclAttrKind DK, const Decl *D);

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

LLVM_READNONE
static bool canAttributeAppearOnDeclKind(DeclAttrKind DAK, DeclKind DK);

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