clang: lib/AST/DeclOpenMP.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

19

20using namespace clang;

21

22

23

24

25

26void OMPThreadPrivateDecl::anchor() {}

27

33 C, DC, {}, VL.size(), L);

34 D->setVars(VL);

35 return D;

36}

37

40 unsigned N) {

42 C, ID, 0, N);

43}

44

46 assert(VL.size() == Data->getNumChildren() &&

47 "Number of variables is not the same as the preallocated buffer");

48 llvm::copy(VL, getVars().begin());

49}

50

51

52

53

54

55void OMPGroupPrivateDecl::anchor() {}

56

61 C, DC, {}, VL.size(), L);

62 D->setVars(VL);

63 return D;

64}

65

68 unsigned N) {

70 C, ID, 0, N);

71}

72

74 assert(VL.size() == Data->getNumChildren() &&

75 "Number of variables is not the same as the preallocated buffer");

76 llvm::copy(VL, getVars().begin());

77}

78

79

80

81

82

83void OMPAllocateDecl::anchor() { }

84

89 C, DC, CL, VL.size(), L);

90 D->setVars(VL);

91 return D;

92}

93

96 unsigned NVars,

97 unsigned NClauses) {

100}

101

103 assert(VL.size() == Data->getNumChildren() &&

104 "Number of variables is not the same as the preallocated buffer");

105 llvm::copy(VL, getVars().begin());

106}

107

108

109

110

111

112void OMPRequiresDecl::anchor() {}

113

120

127

128

129

130

131

132OMPDeclareReductionDecl::OMPDeclareReductionDecl(

136 PrevDeclInScope(PrevDeclInScope) {

138}

139

140void OMPDeclareReductionDecl::anchor() {}

141

144 QualType T, OMPDeclareReductionDecl *PrevDeclInScope) {

145 return new (C, DC) OMPDeclareReductionDecl(OMPDeclareReduction, DC, L, Name,

146 T, PrevDeclInScope);

147}

148

151 return new (C, ID) OMPDeclareReductionDecl(

153 QualType(), nullptr);

154}

155

157 return cast_or_null(

158 PrevDeclInScope.get(getASTContext().getExternalSource()));

159}

162 return cast_or_null(

163 PrevDeclInScope.get(getASTContext().getExternalSource()));

164}

165

166

167

168

169

170void OMPDeclareMapperDecl::anchor() {}

171

175 OMPDeclareMapperDecl *PrevDeclInScope) {

177 C, DC, Clauses, 1, L, Name, T, VarName, PrevDeclInScope);

178}

179

187

189 return cast_or_null(

190 PrevDeclInScope.get(getASTContext().getExternalSource()));

191}

192

194 return cast_or_null(

195 PrevDeclInScope.get(getASTContext().getExternalSource()));

196}

197

198

199

200

201

202void OMPCapturedExprDecl::anchor() {}

203

207 return new (C, DC) OMPCapturedExprDecl(

208 C, DC, Id, T, C.getTrivialTypeSourceInfo(T), StartLoc);

209}

210

213 return new (C, ID) OMPCapturedExprDecl(C, nullptr, nullptr, QualType(),

215}

216

Defines the clang::ASTContext interface.

This file defines OpenMP nodes for declarative directives.

Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...

DeclContext - This is used only as base class of specific decl types that can act as declaration cont...

DeclContext(Decl::Kind K)

SourceLocation getEndLoc() const LLVM_READONLY

ASTContext & getASTContext() const LLVM_READONLY

The name of a declaration.

SourceLocation getBeginLoc() const LLVM_READONLY

One of these records is kept for each identifier that is lexed.

static OMPAllocateDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, ArrayRef< Expr * > VL, ArrayRef< OMPClause * > CL)

Definition DeclOpenMP.cpp:85

static OMPAllocateDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID, unsigned NVars, unsigned NClauses)

Definition DeclOpenMP.cpp:94

static OMPCapturedExprDecl * Create(ASTContext &C, DeclContext *DC, IdentifierInfo *Id, QualType T, SourceLocation StartLoc)

Definition DeclOpenMP.cpp:204

static OMPCapturedExprDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)

Definition DeclOpenMP.cpp:211

SourceRange getSourceRange() const override LLVM_READONLY

Source range that this declaration covers.

Definition DeclOpenMP.cpp:217

static T * createEmptyDirective(const ASTContext &C, GlobalDeclID ID, unsigned NumClauses, unsigned NumChildren, Params &&... P)

static T * createDirective(const ASTContext &C, DeclContext *DC, ArrayRef< OMPClause * > Clauses, unsigned NumChildren, Params &&... P)

static OMPDeclareMapperDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID, unsigned N)

Creates deserialized declare mapper node.

Definition DeclOpenMP.cpp:180

OMPDeclareMapperDecl * getPrevDeclInScope()

Get reference to previous declare mapper construct in the same scope with the same name.

Definition DeclOpenMP.cpp:188

static OMPDeclareMapperDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, DeclarationName Name, QualType T, DeclarationName VarName, ArrayRef< OMPClause * > Clauses, OMPDeclareMapperDecl *PrevDeclInScope)

Creates declare mapper node.

Definition DeclOpenMP.cpp:172

This represents 'pragma omp declare reduction ...' directive.

static OMPDeclareReductionDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, DeclarationName Name, QualType T, OMPDeclareReductionDecl *PrevDeclInScope)

Create declare reduction node.

Definition DeclOpenMP.cpp:142

OMPDeclareReductionDecl * getPrevDeclInScope()

Get reference to previous declare reduction construct in the same scope with the same name.

Definition DeclOpenMP.cpp:156

static OMPDeclareReductionDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)

Create deserialized declare reduction node.

Definition DeclOpenMP.cpp:150

static OMPGroupPrivateDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, ArrayRef< Expr * > VL)

Definition DeclOpenMP.cpp:57

static OMPGroupPrivateDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID, unsigned N)

Definition DeclOpenMP.cpp:66

static OMPRequiresDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID, unsigned N)

Create deserialized requires node.

Definition DeclOpenMP.cpp:121

static OMPRequiresDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, ArrayRef< OMPClause * > CL)

Create requires node.

Definition DeclOpenMP.cpp:114

static OMPThreadPrivateDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID, unsigned N)

Definition DeclOpenMP.cpp:38

static OMPThreadPrivateDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, ArrayRef< Expr * > VL)

Definition DeclOpenMP.cpp:28

A (possibly-)qualified type.

Encodes a location in the source.

A trivial tuple used to represent a source range.

Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...

const Expr * getInit() const

The JSON file list parser is used to communicate input to InstallAPI.

nullptr

This class represents a compute construct, representing a 'Kind' of ‘parallel’, 'serial',...

const FunctionProtoType * T