forked from OSchip/llvm-project
Remove Sema.h's dependency on DeclCXX.h.
llvm-svn: 112032
This commit is contained in:
parent
761e7fb605
commit
28a0cf7825
|
@ -16,6 +16,7 @@
|
|||
#define LLVM_CLANG_SEMA_LOOKUP_H
|
||||
|
||||
#include "clang/Sema/Sema.h"
|
||||
#include "clang/AST/DeclCXX.h"
|
||||
|
||||
namespace clang {
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include "clang/Sema/ObjCMethodList.h"
|
||||
#include "clang/Sema/SemaDiagnostic.h"
|
||||
#include "clang/AST/Decl.h"
|
||||
#include "clang/AST/DeclCXX.h"
|
||||
#include "clang/AST/Expr.h"
|
||||
#include "clang/AST/DeclarationName.h"
|
||||
#include "llvm/ADT/OwningPtr.h"
|
||||
|
@ -396,7 +395,8 @@ public:
|
|||
CXXRecordDecl *DerivedClass,
|
||||
AccessSpecifier Access)
|
||||
: Access(Access), IsMember(false),
|
||||
Target(BaseClass), NamingClass(DerivedClass),
|
||||
Target(reinterpret_cast<NamedDecl*>(BaseClass)),
|
||||
NamingClass(DerivedClass),
|
||||
Diag(0, Context.getDiagAllocator()) {
|
||||
}
|
||||
|
||||
|
@ -409,7 +409,9 @@ public:
|
|||
CXXRecordDecl *getNamingClass() const { return NamingClass; }
|
||||
|
||||
// ...and these apply to hierarchy conversions.
|
||||
CXXRecordDecl *getBaseClass() const { return cast<CXXRecordDecl>(Target); }
|
||||
CXXRecordDecl *getBaseClass() const {
|
||||
assert(!IsMember); return reinterpret_cast<CXXRecordDecl*>(Target);
|
||||
}
|
||||
CXXRecordDecl *getDerivedClass() const { return NamingClass; }
|
||||
|
||||
/// Retrieves the base object type, important when accessing
|
||||
|
@ -2157,16 +2159,10 @@ public:
|
|||
AttributeList *AttrList);
|
||||
virtual void ActOnFinishNamespaceDef(Decl *Dcl, SourceLocation RBrace);
|
||||
|
||||
NamespaceDecl *getStdNamespace() const {
|
||||
return cast_or_null<NamespaceDecl>(
|
||||
StdNamespace.get(Context.getExternalSource()));
|
||||
}
|
||||
NamespaceDecl *getStdNamespace() const;
|
||||
NamespaceDecl *getOrCreateStdNamespace();
|
||||
|
||||
CXXRecordDecl *getStdBadAlloc() const {
|
||||
return cast_or_null<CXXRecordDecl>(
|
||||
StdBadAlloc.get(Context.getExternalSource()));
|
||||
}
|
||||
CXXRecordDecl *getStdBadAlloc() const;
|
||||
|
||||
virtual Decl *ActOnUsingDirective(Scope *CurScope,
|
||||
SourceLocation UsingLoc,
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "clang/Sema/SemaConsumer.h"
|
||||
#include "clang/Sema/ExternalSemaSource.h"
|
||||
#include "clang/AST/ASTConsumer.h"
|
||||
#include "clang/AST/DeclCXX.h"
|
||||
#include "clang/AST/ExternalASTSource.h"
|
||||
#include "clang/AST/Stmt.h"
|
||||
#include "clang/Parse/Parser.h"
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "clang/Sema/AnalysisBasedWarnings.h"
|
||||
#include "clang/Basic/SourceManager.h"
|
||||
#include "clang/AST/DeclObjC.h"
|
||||
#include "clang/AST/DeclCXX.h"
|
||||
#include "clang/AST/ExprObjC.h"
|
||||
#include "clang/AST/ExprCXX.h"
|
||||
#include "clang/AST/StmtObjC.h"
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "clang/Sema/Sema.h"
|
||||
#include "clang/AST/DeclCXX.h"
|
||||
#include "clang/AST/Expr.h"
|
||||
#include "clang/AST/StmtObjC.h"
|
||||
#include "clang/AST/StmtCXX.h"
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "clang/Sema/SemaConsumer.h"
|
||||
#include "clang/AST/ASTContext.h"
|
||||
#include "clang/AST/ASTDiagnostic.h"
|
||||
#include "clang/AST/DeclCXX.h"
|
||||
#include "clang/AST/DeclObjC.h"
|
||||
#include "clang/AST/Expr.h"
|
||||
#include "clang/Lex/Preprocessor.h"
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "clang/Analysis/Analyses/FormatString.h"
|
||||
#include "clang/AST/ASTContext.h"
|
||||
#include "clang/AST/CharUnits.h"
|
||||
#include "clang/AST/DeclCXX.h"
|
||||
#include "clang/AST/DeclObjC.h"
|
||||
#include "clang/AST/ExprCXX.h"
|
||||
#include "clang/AST/ExprObjC.h"
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "clang/AST/ASTConsumer.h"
|
||||
#include "clang/AST/ASTContext.h"
|
||||
#include "clang/AST/CXXInheritance.h"
|
||||
#include "clang/AST/DeclCXX.h"
|
||||
#include "clang/AST/DeclObjC.h"
|
||||
#include "clang/AST/DeclTemplate.h"
|
||||
#include "clang/AST/ExprCXX.h"
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "clang/Sema/Sema.h"
|
||||
#include "TargetAttributesSema.h"
|
||||
#include "clang/AST/ASTContext.h"
|
||||
#include "clang/AST/DeclCXX.h"
|
||||
#include "clang/AST/DeclObjC.h"
|
||||
#include "clang/AST/Expr.h"
|
||||
#include "clang/Basic/TargetInfo.h"
|
||||
|
|
|
@ -3430,6 +3430,16 @@ void Sema::ActOnFinishNamespaceDef(Decl *Dcl, SourceLocation RBrace) {
|
|||
PopPragmaVisibility();
|
||||
}
|
||||
|
||||
CXXRecordDecl *Sema::getStdBadAlloc() const {
|
||||
return cast_or_null<CXXRecordDecl>(
|
||||
StdBadAlloc.get(Context.getExternalSource()));
|
||||
}
|
||||
|
||||
NamespaceDecl *Sema::getStdNamespace() const {
|
||||
return cast_or_null<NamespaceDecl>(
|
||||
StdNamespace.get(Context.getExternalSource()));
|
||||
}
|
||||
|
||||
/// \brief Retrieve the special "std" namespace, which may require us to
|
||||
/// implicitly define the namespace.
|
||||
NamespaceDecl *Sema::getOrCreateStdNamespace() {
|
||||
|
|
|
@ -12,9 +12,10 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "clang/Sema/Sema.h"
|
||||
#include "TargetAttributesSema.h"
|
||||
#include "clang/Sema/Sema.h"
|
||||
#include "clang/Basic/TargetInfo.h"
|
||||
#include "clang/AST/DeclCXX.h"
|
||||
#include "llvm/ADT/Triple.h"
|
||||
|
||||
using namespace clang;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
namespace clang {
|
||||
class Scope;
|
||||
class Decl;
|
||||
class Attr;
|
||||
class AttributeList;
|
||||
class Sema;
|
||||
|
||||
class TargetAttributesSema {
|
||||
|
|
Loading…
Reference in New Issue