1 | //===--- StmtOpenACC.cpp - Classes for OpenACC Constructs -----------------===// |
---|---|
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | // |
9 | // This file implements the subclesses of Stmt class declared in StmtOpenACC.h |
10 | // |
11 | //===----------------------------------------------------------------------===// |
12 | |
13 | #include "clang/AST/StmtOpenACC.h" |
14 | #include "clang/AST/ASTContext.h" |
15 | using namespace clang; |
16 | |
17 | OpenACCComputeConstruct * |
18 | OpenACCComputeConstruct::CreateEmpty(const ASTContext &C, EmptyShell) { |
19 | void *Mem = C.Allocate(Size: sizeof(OpenACCComputeConstruct), |
20 | Align: alignof(OpenACCComputeConstruct)); |
21 | auto *Inst = new (Mem) OpenACCComputeConstruct; |
22 | return Inst; |
23 | } |
24 | |
25 | OpenACCComputeConstruct * |
26 | OpenACCComputeConstruct::Create(const ASTContext &C, OpenACCDirectiveKind K, |
27 | SourceLocation BeginLoc, |
28 | SourceLocation EndLoc) { |
29 | void *Mem = C.Allocate(Size: sizeof(OpenACCComputeConstruct), |
30 | Align: alignof(OpenACCComputeConstruct)); |
31 | auto *Inst = new (Mem) OpenACCComputeConstruct(K, BeginLoc, EndLoc); |
32 | return Inst; |
33 | } |
34 |