Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions include/clang/AST/Attr.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "clang/Basic/Sanitizers.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/VersionTuple.h"
#include "llvm/ADT/PointerEmbeddedInt.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
Expand Down
26 changes: 26 additions & 0 deletions include/clang/Basic/Attr.td
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ class VariadicEnumArgument<string name, string type, list<string> values,
list<string> Enums = enums;
}

// Represents an attribute wrapped by another attribute.
class AttrArgument<string name, bit opt = 0> : Argument<name, opt>;

// This handles one spelling of an attribute.
class Spelling<string name, string variety> {
string Name = name;
Expand Down Expand Up @@ -1500,6 +1503,29 @@ def SwiftImportPropertyAsAccessors : InheritableAttr {
let Documentation = [Undocumented];
}

def SwiftVersioned : Attr {
// This attribute has no spellings as it is only ever created implicitly
// from API notes.
let Spellings = [];
let Args = [VersionArgument<"Version">, AttrArgument<"AttrToAdd">];
let SemaHandler = 0;
let Documentation = [Undocumented];
}

def SwiftVersionedRemoval : Attr {
// This attribute has no spellings as it is only ever created implicitly
// from API notes.
let Spellings = [];
let Args = [VersionArgument<"Version">, UnsignedArgument<"RawKind">];
let SemaHandler = 0;
let Documentation = [Undocumented];
let AdditionalMembers = [{
attr::Kind getAttrKindToRemove() const {
return static_cast<attr::Kind>(getRawKind());
}
}];
}

def ReqdWorkGroupSize : InheritableAttr {
let Spellings = [GNU<"reqd_work_group_size">];
let Args = [UnsignedArgument<"XDim">, UnsignedArgument<"YDim">,
Expand Down
Loading