Don't use ASTContext in DeclOpenMP.h because it's still incomplete.

llvm-svn: 352919
This commit is contained in:
Eric Fiselier 2019-02-01 21:19:20 +00:00
parent 614dd19869
commit de9ffab1ca
2 changed files with 12 additions and 8 deletions

View File

@ -289,14 +289,8 @@ public:
/// Get reference to previous declare mapper construct in the same
/// scope with the same name.
OMPDeclareMapperDecl *getPrevDeclInScope() {
return cast_or_null<OMPDeclareMapperDecl>(
PrevDeclInScope.get(getASTContext().getExternalSource()));
}
const OMPDeclareMapperDecl *getPrevDeclInScope() const {
return cast_or_null<OMPDeclareMapperDecl>(
PrevDeclInScope.get(getASTContext().getExternalSource()));
}
OMPDeclareMapperDecl *getPrevDeclInScope();
const OMPDeclareMapperDecl *getPrevDeclInScope() const;
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classofKind(Kind K) { return K == OMPDeclareMapper; }

View File

@ -172,6 +172,16 @@ void OMPDeclareMapperDecl::setClauses(ArrayRef<OMPClause *> CL) {
std::uninitialized_copy(CL.begin(), CL.end(), Clauses.data());
}
OMPDeclareMapperDecl *OMPDeclareMapperDecl::getPrevDeclInScope() {
return cast_or_null<OMPDeclareMapperDecl>(
PrevDeclInScope.get(getASTContext().getExternalSource()));
}
const OMPDeclareMapperDecl *OMPDeclareMapperDecl::getPrevDeclInScope() const {
return cast_or_null<OMPDeclareMapperDecl>(
PrevDeclInScope.get(getASTContext().getExternalSource()));
}
//===----------------------------------------------------------------------===//
// OMPCapturedExprDecl Implementation.
//===----------------------------------------------------------------------===//