From: John McCall Date: Wed, 25 Aug 2010 22:03:47 +0000 (+0000) Subject: Split out a header to hold APIs meant for the Sema implementation from Sema.h. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2d88708cbe4e4ec5e04e4acb6bd7f5be68557379;p=clang Split out a header to hold APIs meant for the Sema implementation from Sema.h. Clients of Sema don't need to know (for example) the list of diagnostics we support. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112093 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index 491a38668a..4bbc021bcd 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -19,7 +19,6 @@ #include "clang/Sema/AnalysisBasedWarnings.h" #include "clang/Sema/IdentifierResolver.h" #include "clang/Sema/ObjCMethodList.h" -#include "clang/Sema/SemaDiagnostic.h" #include "clang/AST/OperationKinds.h" #include "clang/AST/Decl.h" #include "clang/AST/Expr.h" @@ -43,6 +42,7 @@ namespace clang { class ArrayType; class CXXBasePath; class CXXBasePaths; + typedef llvm::SmallVector CXXCastPath; class CXXConstructorDecl; class CXXConversionDecl; class CXXDestructorDecl; diff --git a/include/clang/Sema/SemaInternal.h b/include/clang/Sema/SemaInternal.h new file mode 100644 index 0000000000..1871350deb --- /dev/null +++ b/include/clang/Sema/SemaInternal.h @@ -0,0 +1,21 @@ +//===--- SemaInternal.h - Internal Sema Interfaces --------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file provides common API and #includes for the internal +// implementation of Sema. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_SEMA_SEMA_INTERNAL_H +#define LLVM_CLANG_SEMA_SEMA_INTERNAL_H + +#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaDiagnostic.h" + +#endif diff --git a/lib/Sema/AnalysisBasedWarnings.cpp b/lib/Sema/AnalysisBasedWarnings.cpp index 775681eebe..cfebed6a05 100644 --- a/lib/Sema/AnalysisBasedWarnings.cpp +++ b/lib/Sema/AnalysisBasedWarnings.cpp @@ -13,8 +13,8 @@ // //===----------------------------------------------------------------------===// -#include "clang/Sema/Sema.h" #include "clang/Sema/AnalysisBasedWarnings.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Basic/SourceManager.h" #include "clang/AST/DeclObjC.h" #include "clang/AST/DeclCXX.h" diff --git a/lib/Sema/JumpDiagnostics.cpp b/lib/Sema/JumpDiagnostics.cpp index 7bab65a072..b23f615af7 100644 --- a/lib/Sema/JumpDiagnostics.cpp +++ b/lib/Sema/JumpDiagnostics.cpp @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/AST/DeclCXX.h" #include "clang/AST/Expr.h" #include "clang/AST/StmtObjC.h" diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index 2e8827ddec..fd6dcfc095 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #include "clang/Sema/Sema.h" +#include "clang/Sema/SemaDiagnostic.h" #include "TargetAttributesSema.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallSet.h" diff --git a/lib/Sema/SemaAccess.cpp b/lib/Sema/SemaAccess.cpp index 90d3177222..965ec66a13 100644 --- a/lib/Sema/SemaAccess.cpp +++ b/lib/Sema/SemaAccess.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Sema/Initialization.h" #include "clang/Sema/Lookup.h" #include "clang/AST/ASTContext.h" diff --git a/lib/Sema/SemaAttr.cpp b/lib/Sema/SemaAttr.cpp index 66d31dda9f..4ba1a236ff 100644 --- a/lib/Sema/SemaAttr.cpp +++ b/lib/Sema/SemaAttr.cpp @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Sema/Lookup.h" #include "clang/AST/Attr.h" #include "clang/AST/Expr.h" diff --git a/lib/Sema/SemaCXXCast.cpp b/lib/Sema/SemaCXXCast.cpp index 89feea8a8d..c58c92cfce 100644 --- a/lib/Sema/SemaCXXCast.cpp +++ b/lib/Sema/SemaCXXCast.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Sema/Initialization.h" #include "clang/AST/ExprCXX.h" #include "clang/AST/ASTContext.h" diff --git a/lib/Sema/SemaCXXScopeSpec.cpp b/lib/Sema/SemaCXXScopeSpec.cpp index de09ba4ae3..d7ef79304f 100644 --- a/lib/Sema/SemaCXXScopeSpec.cpp +++ b/lib/Sema/SemaCXXScopeSpec.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Sema/Lookup.h" #include "clang/AST/ASTContext.h" #include "clang/AST/DeclTemplate.h" diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index f759b02327..caef9fb9ed 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Sema/ScopeInfo.h" #include "clang/Analysis/Analyses/FormatString.h" #include "clang/AST/ASTContext.h" diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp index f8bb9b5a75..fed6536570 100644 --- a/lib/Sema/SemaCodeComplete.cpp +++ b/lib/Sema/SemaCodeComplete.cpp @@ -10,7 +10,7 @@ // This file defines the code-completion semantic actions. // //===----------------------------------------------------------------------===// -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Sema/Lookup.h" #include "clang/Sema/Overload.h" #include "clang/Sema/CodeCompleteConsumer.h" diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 242a4df86d..158566a384 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Sema/Initialization.h" #include "clang/Sema/Lookup.h" #include "clang/Sema/CXXFieldCollector.h" diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index f515e68839..a2cad6a5d2 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "TargetAttributesSema.h" #include "clang/AST/ASTContext.h" #include "clang/AST/DeclCXX.h" diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 6a09a75ddc..e2662722b4 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Sema/CXXFieldCollector.h" #include "clang/Sema/Scope.h" #include "clang/Sema/Initialization.h" diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 13e42edaae..a0348540e5 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Sema/Lookup.h" #include "clang/Sema/ExternalSemaSource.h" #include "clang/Sema/Scope.h" diff --git a/lib/Sema/SemaExceptionSpec.cpp b/lib/Sema/SemaExceptionSpec.cpp index 889ff2018a..101d741724 100644 --- a/lib/Sema/SemaExceptionSpec.cpp +++ b/lib/Sema/SemaExceptionSpec.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/AST/CXXInheritance.h" #include "clang/AST/Expr.h" #include "clang/AST/ExprCXX.h" diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index fe9665e4d9..0bc58ef21c 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Sema/Initialization.h" #include "clang/Sema/Lookup.h" #include "clang/Sema/AnalysisBasedWarnings.h" diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index be84833995..0bff419107 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Sema/DeclSpec.h" #include "clang/Sema/Initialization.h" #include "clang/Sema/Lookup.h" diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp index 9558d3c875..56d80a0288 100644 --- a/lib/Sema/SemaExprObjC.cpp +++ b/lib/Sema/SemaExprObjC.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Sema/Lookup.h" #include "clang/Sema/Scope.h" #include "clang/Sema/Initialization.h" diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index 7b9c25e456..cd498a0502 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -18,7 +18,7 @@ #include "clang/Sema/Designator.h" #include "clang/Sema/Initialization.h" #include "clang/Sema/Lookup.h" -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Lex/Preprocessor.h" #include "clang/AST/ASTContext.h" #include "clang/AST/DeclObjC.h" diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp index eedfa92c3b..bb267e3733 100644 --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -12,6 +12,7 @@ // //===----------------------------------------------------------------------===// #include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Sema/Lookup.h" #include "clang/Sema/DeclSpec.h" #include "clang/Sema/Scope.h" diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp index 7d5f15d814..61d7603cdf 100644 --- a/lib/Sema/SemaObjCProperty.cpp +++ b/lib/Sema/SemaObjCProperty.cpp @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Sema/Initialization.h" #include "clang/AST/DeclObjC.h" #include "clang/AST/ExprObjC.h" diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index 5dbb966867..0d5968f1ef 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Sema/Lookup.h" #include "clang/Sema/Initialization.h" #include "clang/Sema/Template.h" diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index dd3dc6cf40..aa1aa028c4 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Sema/Scope.h" #include "clang/Sema/ScopeInfo.h" #include "clang/Sema/Initialization.h" diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index 8f00bf9d1b..22a0933c72 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -9,7 +9,7 @@ // This file implements semantic analysis for C++ templates. //===----------------------------------------------------------------------===/ -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Sema/Lookup.h" #include "clang/Sema/Scope.h" #include "clang/Sema/Template.h" diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp index 0458413f35..024060fb99 100644 --- a/lib/Sema/SemaTemplateInstantiate.cpp +++ b/lib/Sema/SemaTemplateInstantiate.cpp @@ -10,7 +10,7 @@ // //===----------------------------------------------------------------------===/ -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "TreeTransform.h" #include "clang/Sema/DeclSpec.h" #include "clang/Sema/Lookup.h" diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp index db216f3c56..1e95b911f1 100644 --- a/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -9,7 +9,7 @@ // This file implements C++ template instantiation for declarations. // //===----------------------------------------------------------------------===/ -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Sema/Lookup.h" #include "clang/Sema/Template.h" #include "clang/AST/ASTConsumer.h" diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index e05766448c..2bff6838c4 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Sema/Template.h" #include "clang/AST/ASTContext.h" #include "clang/AST/CXXInheritance.h" diff --git a/lib/Sema/TargetAttributesSema.cpp b/lib/Sema/TargetAttributesSema.cpp index 52b069675d..1854e74308 100644 --- a/lib/Sema/TargetAttributesSema.cpp +++ b/lib/Sema/TargetAttributesSema.cpp @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// #include "TargetAttributesSema.h" -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Basic/TargetInfo.h" #include "clang/AST/DeclCXX.h" #include "llvm/ADT/Triple.h" diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h index 993762b79f..ed531c7466 100644 --- a/lib/Sema/TreeTransform.h +++ b/lib/Sema/TreeTransform.h @@ -13,7 +13,7 @@ #ifndef LLVM_CLANG_SEMA_TREETRANSFORM_H #define LLVM_CLANG_SEMA_TREETRANSFORM_H -#include "clang/Sema/Sema.h" +#include "clang/Sema/SemaInternal.h" #include "clang/Sema/Lookup.h" #include "clang/Sema/SemaDiagnostic.h" #include "clang/Sema/ScopeInfo.h"