summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/tools/clang/lib/AST/DeclOpenMP.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2017-01-14 19:55:43 +0000
committerpatrick <patrick@openbsd.org>2017-01-14 19:55:43 +0000
commitbd3306aecb3a15e8967143b8cdbbccf2b1b19b74 (patch)
tree309a8132b44564b9e634c0da6815187ce8eab27c /gnu/llvm/tools/clang/lib/AST/DeclOpenMP.cpp
parentkillp -a should not kill the window if only one pane. (diff)
downloadwireguard-openbsd-bd3306aecb3a15e8967143b8cdbbccf2b1b19b74.tar.xz
wireguard-openbsd-bd3306aecb3a15e8967143b8cdbbccf2b1b19b74.zip
Import LLVM 3.9.1 including clang and lld.
Diffstat (limited to 'gnu/llvm/tools/clang/lib/AST/DeclOpenMP.cpp')
-rw-r--r--gnu/llvm/tools/clang/lib/AST/DeclOpenMP.cpp50
1 files changed, 49 insertions, 1 deletions
diff --git a/gnu/llvm/tools/clang/lib/AST/DeclOpenMP.cpp b/gnu/llvm/tools/clang/lib/AST/DeclOpenMP.cpp
index 493e2cd4122..5b06ce0778a 100644
--- a/gnu/llvm/tools/clang/lib/AST/DeclOpenMP.cpp
+++ b/gnu/llvm/tools/clang/lib/AST/DeclOpenMP.cpp
@@ -7,7 +7,8 @@
//
//===----------------------------------------------------------------------===//
/// \file
-/// \brief This file implements OMPThreadPrivateDecl class.
+/// \brief This file implements OMPThreadPrivateDecl, OMPCapturedExprDecl
+/// classes.
///
//===----------------------------------------------------------------------===//
@@ -52,3 +53,50 @@ void OMPThreadPrivateDecl::setVars(ArrayRef<Expr *> VL) {
std::uninitialized_copy(VL.begin(), VL.end(), getTrailingObjects<Expr *>());
}
+//===----------------------------------------------------------------------===//
+// OMPDeclareReductionDecl Implementation.
+//===----------------------------------------------------------------------===//
+
+void OMPDeclareReductionDecl::anchor() {}
+
+OMPDeclareReductionDecl *OMPDeclareReductionDecl::Create(
+ ASTContext &C, DeclContext *DC, SourceLocation L, DeclarationName Name,
+ QualType T, OMPDeclareReductionDecl *PrevDeclInScope) {
+ return new (C, DC) OMPDeclareReductionDecl(OMPDeclareReduction, DC, L, Name,
+ T, PrevDeclInScope);
+}
+
+OMPDeclareReductionDecl *
+OMPDeclareReductionDecl::CreateDeserialized(ASTContext &C, unsigned ID) {
+ return new (C, ID) OMPDeclareReductionDecl(
+ OMPDeclareReduction, /*DC=*/nullptr, SourceLocation(), DeclarationName(),
+ QualType(), /*PrevDeclInScope=*/nullptr);
+}
+
+OMPDeclareReductionDecl *OMPDeclareReductionDecl::getPrevDeclInScope() {
+ return cast_or_null<OMPDeclareReductionDecl>(
+ PrevDeclInScope.get(getASTContext().getExternalSource()));
+}
+const OMPDeclareReductionDecl *
+OMPDeclareReductionDecl::getPrevDeclInScope() const {
+ return cast_or_null<OMPDeclareReductionDecl>(
+ PrevDeclInScope.get(getASTContext().getExternalSource()));
+}
+
+//===----------------------------------------------------------------------===//
+// OMPCapturedExprDecl Implementation.
+//===----------------------------------------------------------------------===//
+
+void OMPCapturedExprDecl::anchor() {}
+
+OMPCapturedExprDecl *OMPCapturedExprDecl::Create(ASTContext &C, DeclContext *DC,
+ IdentifierInfo *Id,
+ QualType T) {
+ return new (C, DC) OMPCapturedExprDecl(C, DC, Id, T);
+}
+
+OMPCapturedExprDecl *OMPCapturedExprDecl::CreateDeserialized(ASTContext &C,
+ unsigned ID) {
+ return new (C, ID) OMPCapturedExprDecl(C, nullptr, nullptr, QualType());
+}
+