mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: support @_effects attribute with custom strings.
In addition to the predefined cases, like "readnone", "readonly", etc. support providing a custom string, which will be parsed later. Also, allow multiple effects attributes to be put onto a function.
This commit is contained in:
@@ -727,18 +727,6 @@ bool SILDeclRef::isAlwaysInline() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SILDeclRef::hasEffectsAttribute() const {
|
||||
if (!hasDecl())
|
||||
return false;
|
||||
return getDecl()->getAttrs().hasAttribute<EffectsAttr>();
|
||||
}
|
||||
|
||||
EffectsKind SILDeclRef::getEffectsAttribute() const {
|
||||
assert(hasEffectsAttribute());
|
||||
EffectsAttr *MA = getDecl()->getAttrs().getAttribute<EffectsAttr>();
|
||||
return MA->getKind();
|
||||
}
|
||||
|
||||
bool SILDeclRef::isAnyThunk() const {
|
||||
return isForeignToNativeThunk() ||
|
||||
isNativeToForeignThunk() ||
|
||||
|
||||
Reference in New Issue
Block a user