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

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 1 13:19:20 PST 2019


Author: ericwf
Date: Fri Feb  1 13:19:20 2019
New Revision: 352919

URL: http://llvm.org/viewvc/llvm-project?rev=352919&view=rev
Log:
Don't use ASTContext in DeclOpenMP.h because it's still incomplete.

Modified:
    cfe/trunk/include/clang/AST/DeclOpenMP.h
    cfe/trunk/lib/AST/DeclOpenMP.cpp

Modified: cfe/trunk/include/clang/AST/DeclOpenMP.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclOpenMP.h?rev=352919&r1=352918&r2=352919&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclOpenMP.h (original)
+++ cfe/trunk/include/clang/AST/DeclOpenMP.h Fri Feb  1 13:19:20 2019
@@ -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; }

Modified: cfe/trunk/lib/AST/DeclOpenMP.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclOpenMP.cpp?rev=352919&r1=352918&r2=352919&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclOpenMP.cpp (original)
+++ cfe/trunk/lib/AST/DeclOpenMP.cpp Fri Feb  1 13:19:20 2019
@@ -172,6 +172,16 @@ void OMPDeclareMapperDecl::setClauses(Ar
   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.
 //===----------------------------------------------------------------------===//




More information about the cfe-commits mailing list