зеркало из https://github.com/microsoft/clang.git
More #include cleaning
- Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and SourceLocation.h) - Move ASTContext constructor into implementation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54627 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
e4858a65a9
Коммит
e91593ef08
|
@ -12,10 +12,11 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "HTMLDiagnostics.h"
|
||||
#include "clang/Analysis/PathDiagnostic.h"
|
||||
#include "clang/AST/ASTContext.h"
|
||||
#include "clang/AST/Decl.h"
|
||||
#include "clang/Basic/SourceManager.h"
|
||||
#include "clang/Basic/FileManager.h"
|
||||
#include "clang/AST/ASTContext.h"
|
||||
#include "clang/Analysis/PathDiagnostic.h"
|
||||
#include "clang/Rewrite/Rewriter.h"
|
||||
#include "clang/Rewrite/HTMLRewrite.h"
|
||||
#include "clang/Lex/Lexer.h"
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include "ASTConsumers.h"
|
||||
#include "clang/AST/ASTConsumer.h"
|
||||
#include "clang/AST/Decl.h"
|
||||
#include "clang/Rewrite/Rewriter.h"
|
||||
#include "clang/Rewrite/HTMLRewrite.h"
|
||||
#include "clang/Basic/Diagnostic.h"
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
#include "clang/AST/ASTConsumer.h"
|
||||
#include "clang/AST/CFG.h"
|
||||
#include "clang/AST/Decl.h"
|
||||
#include "clang.h"
|
||||
#include "ASTConsumers.h"
|
||||
#include "clang/AST/TranslationUnit.h"
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "clang/Driver/TextDiagnosticBuffer.h"
|
||||
#include "clang/Driver/TextDiagnosticPrinter.h"
|
||||
#include "clang/Analysis/PathDiagnostic.h"
|
||||
#include "clang/AST/Decl.h"
|
||||
#include "clang/AST/TranslationUnit.h"
|
||||
#include "clang/CodeGen/ModuleBuilder.h"
|
||||
#include "clang/Sema/ParseAST.h"
|
||||
|
|
|
@ -16,11 +16,10 @@
|
|||
|
||||
#include "clang/Basic/LangOptions.h"
|
||||
#include "clang/AST/Builtins.h"
|
||||
#include "clang/AST/Expr.h"
|
||||
#include "clang/AST/RecordLayout.h"
|
||||
#include "clang/AST/DeclBase.h"
|
||||
#include "clang/AST/Type.h"
|
||||
#include "clang/Basic/SourceLocation.h"
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/ADT/StringMap.h"
|
||||
#include "llvm/ADT/FoldingSet.h"
|
||||
#include "llvm/Bitcode/SerializationFwd.h"
|
||||
#include "llvm/Support/Allocator.h"
|
||||
|
@ -31,9 +30,20 @@ namespace llvm {
|
|||
}
|
||||
|
||||
namespace clang {
|
||||
class TargetInfo;
|
||||
class ASTRecordLayout;
|
||||
class Expr;
|
||||
class IdentifierTable;
|
||||
|
||||
class TargetInfo;
|
||||
class SelectorTable;
|
||||
class SourceManager;
|
||||
// Decls
|
||||
class Decl;
|
||||
class RecordDecl;
|
||||
class TagDecl;
|
||||
class TranslationUnitDecl;
|
||||
class TypeDecl;
|
||||
class TypedefDecl;
|
||||
|
||||
/// ASTContext - This class holds long-lived AST nodes (such as types and
|
||||
/// decls) that can be referred to throughout the semantic analysis of a file.
|
||||
class ASTContext {
|
||||
|
@ -128,15 +138,7 @@ public:
|
|||
|
||||
ASTContext(const LangOptions& LOpts, SourceManager &SM, TargetInfo &t,
|
||||
IdentifierTable &idents, SelectorTable &sels,
|
||||
unsigned size_reserve=0 ) :
|
||||
CFConstantStringTypeDecl(0), SourceMgr(SM), LangOpts(LOpts), Target(t),
|
||||
Idents(idents), Selectors(sels) {
|
||||
|
||||
if (size_reserve > 0) Types.reserve(size_reserve);
|
||||
InitBuiltinTypes();
|
||||
BuiltinInfo.InitializeBuiltins(idents, Target);
|
||||
TUDecl = TranslationUnitDecl::Create(*this);
|
||||
}
|
||||
unsigned size_reserve=0);
|
||||
|
||||
~ASTContext();
|
||||
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
#include "clang/AST/Decl.h"
|
||||
#include "clang/AST/DeclCXX.h"
|
||||
#include "clang/AST/DeclObjC.h"
|
||||
#include "clang/AST/Expr.h"
|
||||
#include "clang/AST/RecordLayout.h"
|
||||
#include "clang/Basic/TargetInfo.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/ADT/StringExtras.h"
|
||||
|
@ -27,6 +29,18 @@ enum FloatingRank {
|
|||
FloatRank, DoubleRank, LongDoubleRank
|
||||
};
|
||||
|
||||
ASTContext::ASTContext(const LangOptions& LOpts, SourceManager &SM, TargetInfo &t,
|
||||
IdentifierTable &idents, SelectorTable &sels,
|
||||
unsigned size_reserve) :
|
||||
CFConstantStringTypeDecl(0), SourceMgr(SM), LangOpts(LOpts), Target(t),
|
||||
Idents(idents), Selectors(sels)
|
||||
{
|
||||
if (size_reserve > 0) Types.reserve(size_reserve);
|
||||
InitBuiltinTypes();
|
||||
BuiltinInfo.InitializeBuiltins(idents, Target);
|
||||
TUDecl = TranslationUnitDecl::Create(*this);
|
||||
}
|
||||
|
||||
ASTContext::~ASTContext() {
|
||||
// Deallocate all the types.
|
||||
while (!Types.empty()) {
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include "clang/AST/Builtins.h"
|
||||
#include "clang/AST/ASTContext.h"
|
||||
#include "clang/AST/Decl.h"
|
||||
#include "clang/Basic/IdentifierTable.h"
|
||||
#include "clang/Basic/TargetInfo.h"
|
||||
using namespace clang;
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
|
||||
#include "clang/AST/Decl.h"
|
||||
#include "clang/AST/ASTContext.h"
|
||||
#include "clang/AST/Stmt.h"
|
||||
#include "clang/Basic/IdentifierTable.h"
|
||||
|
||||
using namespace clang;
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "clang/AST/DeclBase.h"
|
||||
#include "clang/AST/DeclObjC.h"
|
||||
#include "clang/AST/DeclCXX.h"
|
||||
#include "clang/AST/ASTContext.h"
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include "clang/AST/DeclObjC.h"
|
||||
#include "clang/AST/ASTContext.h"
|
||||
#include "clang/AST/Stmt.h"
|
||||
using namespace clang;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "clang/AST/ExprObjC.h"
|
||||
#include "clang/AST/ASTContext.h"
|
||||
#include "clang/AST/APValue.h"
|
||||
#include "clang/AST/RecordLayout.h"
|
||||
#include "clang/AST/StmtVisitor.h"
|
||||
#include "clang/Basic/IdentifierTable.h"
|
||||
#include "clang/Basic/TargetInfo.h"
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
#include "CGDebugInfo.h"
|
||||
#include "CodeGenModule.h"
|
||||
#include "clang/AST/ASTContext.h"
|
||||
#include "clang/AST/Decl.h"
|
||||
#include "clang/AST/RecordLayout.h"
|
||||
#include "clang/Basic/SourceManager.h"
|
||||
#include "clang/Basic/FileManager.h"
|
||||
#include "llvm/Constants.h"
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "CGObjCRuntime.h"
|
||||
#include "CodeGenModule.h"
|
||||
#include "clang/AST/ASTContext.h"
|
||||
#include "clang/AST/Decl.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
#include "llvm/Support/IRBuilder.h"
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "CGObjCRuntime.h"
|
||||
#include "CodeGenModule.h"
|
||||
#include "clang/AST/ASTContext.h"
|
||||
#include "clang/AST/Decl.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
#include "llvm/Support/IRBuilder.h"
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#ifndef CLANG_CODEGEN_OBCJRUNTIME_H
|
||||
#define CLANG_CODEGEN_OBCJRUNTIME_H
|
||||
#include "clang/Basic/IdentifierTable.h" // Selector
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include <string>
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "CodeGenTypes.h"
|
||||
#include "clang/Basic/TargetInfo.h"
|
||||
#include "clang/AST/AST.h"
|
||||
#include "clang/AST/RecordLayout.h"
|
||||
#include "llvm/DerivedTypes.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
#include "CodeGenModule.h"
|
||||
#include "clang/AST/ASTContext.h"
|
||||
#include "clang/AST/Decl.h"
|
||||
#include "clang/AST/DeclObjC.h"
|
||||
#include "clang/AST/Expr.h"
|
||||
using namespace clang;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
#include "clang/Sema/ParseAST.h"
|
||||
#include "clang/AST/ASTContext.h"
|
||||
#include "clang/AST/ASTConsumer.h"
|
||||
#include "clang/AST/DeclObjC.h"
|
||||
#include "clang/AST/Stmt.h"
|
||||
#include "clang/AST/TranslationUnit.h"
|
||||
#include "Sema.h"
|
||||
#include "clang/Parse/Action.h"
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
#include "Sema.h"
|
||||
#include "clang/AST/ASTContext.h"
|
||||
#include "clang/AST/Expr.h"
|
||||
#include "clang/Lex/Preprocessor.h"
|
||||
#include "clang/Basic/Diagnostic.h"
|
||||
#include "clang/Parse/Scope.h"
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "clang/AST/ASTContext.h"
|
||||
#include "clang/AST/Decl.h"
|
||||
#include "clang/AST/DeclObjC.h"
|
||||
#include "clang/AST/Expr.h"
|
||||
#include "clang/Basic/Diagnostic.h"
|
||||
#include "clang/Basic/LangOptions.h"
|
||||
#include "clang/Parse/DeclSpec.h"
|
||||
|
|
Загрузка…
Ссылка в новой задаче