| //===---- OpenACCClause.cpp - Classes for OpenACC Clauses ----------------===// |
| // |
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| // See https://llvm.org/LICENSE.txt for license information. |
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| // |
| //===----------------------------------------------------------------------===// |
| // |
| // This file implements the subclasses of the OpenACCClause class declared in |
| // OpenACCClause.h |
| // |
| //===----------------------------------------------------------------------===// |
| |
| #include "clang/AST/OpenACCClause.h" |
| #include "clang/AST/ASTContext.h" |
| |
| using namespace clang; |
| |
| OpenACCDefaultClause *OpenACCDefaultClause::Create(const ASTContext &C, |
| OpenACCDefaultClauseKind K, |
| SourceLocation BeginLoc, |
| SourceLocation LParenLoc, |
| SourceLocation EndLoc) { |
| void *Mem = |
| C.Allocate(sizeof(OpenACCDefaultClause), alignof(OpenACCDefaultClause)); |
| |
| return new (Mem) OpenACCDefaultClause(K, BeginLoc, LParenLoc, EndLoc); |
| } |
| |
| //===----------------------------------------------------------------------===// |
| // OpenACC clauses printing methods |
| //===----------------------------------------------------------------------===// |
| void OpenACCClausePrinter::VisitOpenACCDefaultClause( |
| const OpenACCDefaultClause &C) { |
| OS << "default(" << C.getDefaultClauseKind() << ")"; |
| } |