diff options
| author | 2020-08-03 15:06:44 +0000 | |
|---|---|---|
| committer | 2020-08-03 15:06:44 +0000 | |
| commit | b64793999546ed8adebaeebd9d8345d18db8927d (patch) | |
| tree | 4357c27b561d73b0e089727c6ed659f2ceff5f47 /gnu/llvm/tools/clang/lib/AST/DeclOpenMP.cpp | |
| parent | Add support for UTF-8 DISPLAY-HINTs with octet length. For now only (diff) | |
| download | wireguard-openbsd-b64793999546ed8adebaeebd9d8345d18db8927d.tar.xz wireguard-openbsd-b64793999546ed8adebaeebd9d8345d18db8927d.zip | |
Remove LLVM 8.0.1 files.
Diffstat (limited to 'gnu/llvm/tools/clang/lib/AST/DeclOpenMP.cpp')
| -rw-r--r-- | gnu/llvm/tools/clang/lib/AST/DeclOpenMP.cpp | 148 |
1 files changed, 0 insertions, 148 deletions
diff --git a/gnu/llvm/tools/clang/lib/AST/DeclOpenMP.cpp b/gnu/llvm/tools/clang/lib/AST/DeclOpenMP.cpp deleted file mode 100644 index b77a67cbf38..00000000000 --- a/gnu/llvm/tools/clang/lib/AST/DeclOpenMP.cpp +++ /dev/null @@ -1,148 +0,0 @@ -//===--- DeclOpenMP.cpp - Declaration OpenMP AST Node Implementation ------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// This file implements OMPThreadPrivateDecl, OMPCapturedExprDecl -/// classes. -/// -//===----------------------------------------------------------------------===// - -#include "clang/AST/ASTContext.h" -#include "clang/AST/Decl.h" -#include "clang/AST/DeclBase.h" -#include "clang/AST/DeclOpenMP.h" -#include "clang/AST/Expr.h" - -using namespace clang; - -//===----------------------------------------------------------------------===// -// OMPThreadPrivateDecl Implementation. -//===----------------------------------------------------------------------===// - -void OMPThreadPrivateDecl::anchor() { } - -OMPThreadPrivateDecl *OMPThreadPrivateDecl::Create(ASTContext &C, - DeclContext *DC, - SourceLocation L, - ArrayRef<Expr *> VL) { - OMPThreadPrivateDecl *D = - new (C, DC, additionalSizeToAlloc<Expr *>(VL.size())) - OMPThreadPrivateDecl(OMPThreadPrivate, DC, L); - D->NumVars = VL.size(); - D->setVars(VL); - return D; -} - -OMPThreadPrivateDecl *OMPThreadPrivateDecl::CreateDeserialized(ASTContext &C, - unsigned ID, - unsigned N) { - OMPThreadPrivateDecl *D = new (C, ID, additionalSizeToAlloc<Expr *>(N)) - OMPThreadPrivateDecl(OMPThreadPrivate, nullptr, SourceLocation()); - D->NumVars = N; - return D; -} - -void OMPThreadPrivateDecl::setVars(ArrayRef<Expr *> VL) { - assert(VL.size() == NumVars && - "Number of variables is not the same as the preallocated buffer"); - std::uninitialized_copy(VL.begin(), VL.end(), getTrailingObjects<Expr *>()); -} - -//===----------------------------------------------------------------------===// -// OMPRequiresDecl Implementation. -//===----------------------------------------------------------------------===// - -void OMPRequiresDecl::anchor() {} - -OMPRequiresDecl *OMPRequiresDecl::Create(ASTContext &C, DeclContext *DC, - SourceLocation L, - ArrayRef<OMPClause *> CL) { - OMPRequiresDecl *D = - new (C, DC, additionalSizeToAlloc<OMPClause *>(CL.size())) - OMPRequiresDecl(OMPRequires, DC, L); - D->NumClauses = CL.size(); - D->setClauses(CL); - return D; -} - -OMPRequiresDecl *OMPRequiresDecl::CreateDeserialized(ASTContext &C, unsigned ID, - unsigned N) { - OMPRequiresDecl *D = new (C, ID, additionalSizeToAlloc<OMPClause *>(N)) - OMPRequiresDecl(OMPRequires, nullptr, SourceLocation()); - D->NumClauses = N; - return D; -} - -void OMPRequiresDecl::setClauses(ArrayRef<OMPClause *> CL) { - assert(CL.size() == NumClauses && - "Number of clauses is not the same as the preallocated buffer"); - std::uninitialized_copy(CL.begin(), CL.end(), - getTrailingObjects<OMPClause *>()); -} - -//===----------------------------------------------------------------------===// -// OMPDeclareReductionDecl Implementation. -//===----------------------------------------------------------------------===// - -OMPDeclareReductionDecl::OMPDeclareReductionDecl( - Kind DK, DeclContext *DC, SourceLocation L, DeclarationName Name, - QualType Ty, OMPDeclareReductionDecl *PrevDeclInScope) - : ValueDecl(DK, DC, L, Name, Ty), DeclContext(DK), Combiner(nullptr), - PrevDeclInScope(PrevDeclInScope) { - setInitializer(nullptr, CallInit); -} - -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, - SourceLocation StartLoc) { - return new (C, DC) OMPCapturedExprDecl( - C, DC, Id, T, C.getTrivialTypeSourceInfo(T), StartLoc); -} - -OMPCapturedExprDecl *OMPCapturedExprDecl::CreateDeserialized(ASTContext &C, - unsigned ID) { - return new (C, ID) OMPCapturedExprDecl(C, nullptr, nullptr, QualType(), - /*TInfo=*/nullptr, SourceLocation()); -} - -SourceRange OMPCapturedExprDecl::getSourceRange() const { - assert(hasInit()); - return SourceRange(getInit()->getBeginLoc(), getInit()->getEndLoc()); -} |
