aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/ASTContext.h
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-06-14 09:24:02 +0000
committerEd Schouten <ed@FreeBSD.org>2009-06-14 09:24:02 +0000
commit7ef7bab7e3d06f660b059b903c231f100bb13cc5 (patch)
treed472a7615b5c7e413aa62a77d0777c1a9cf76478 /include/clang/AST/ASTContext.h
parent8ba99c00327a4394e7568244d6cffd6e62625a7a (diff)
Import Clang r73340.vendor/clang/clang-r73340
Notes
Notes: svn path=/vendor/clang/dist/; revision=194179 svn path=/vendor/clang/clang-r73340/; revision=194181; tag=vendor/clang/clang-r73340
Diffstat (limited to 'include/clang/AST/ASTContext.h')
-rw-r--r--include/clang/AST/ASTContext.h29
1 files changed, 14 insertions, 15 deletions
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h
index b02faa8ff378..f4313f4dbfff 100644
--- a/include/clang/AST/ASTContext.h
+++ b/include/clang/AST/ASTContext.h
@@ -17,13 +17,11 @@
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/LangOptions.h"
#include "clang/AST/Attr.h"
-#include "clang/AST/Builtins.h"
#include "clang/AST/Decl.h"
#include "clang/AST/NestedNameSpecifier.h"
#include "clang/AST/PrettyPrinter.h"
#include "clang/AST/TemplateName.h"
#include "clang/AST/Type.h"
-#include "clang/Basic/SourceLocation.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/OwningPtr.h"
@@ -56,6 +54,8 @@ namespace clang {
class ObjCIvarRefExpr;
class ObjCIvarDecl;
+ namespace Builtin { class Context; }
+
/// 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 {
@@ -142,6 +142,7 @@ public:
TargetInfo &Target;
IdentifierTable &Idents;
SelectorTable &Selectors;
+ Builtin::Context &BuiltinInfo;
DeclarationNameTable DeclarationNames;
llvm::OwningPtr<ExternalASTSource> ExternalSource;
clang::PrintingPolicy PrintingPolicy;
@@ -164,7 +165,6 @@ public:
TranslationUnitDecl *getTranslationUnitDecl() const { return TUDecl; }
- Builtin::Context BuiltinInfo;
// Builtin Types.
QualType VoidTy;
@@ -181,21 +181,12 @@ public:
QualType DependentTy;
ASTContext(const LangOptions& LOpts, SourceManager &SM, TargetInfo &t,
- IdentifierTable &idents, SelectorTable &sels,
- bool FreeMemory = true, unsigned size_reserve=0,
- bool InitializeBuiltins = true);
+ IdentifierTable &idents, SelectorTable &sels,
+ Builtin::Context &builtins,
+ bool FreeMemory = true, unsigned size_reserve=0);
~ASTContext();
- /// \brief Initialize builtins.
- ///
- /// Typically, this routine will be called automatically by the
- /// constructor. However, in certain cases (e.g., when there is a
- /// PCH file to be loaded), the constructor does not perform
- /// initialization for builtins. This routine can be called to
- /// perform the initialization.
- void InitializeBuiltins(IdentifierTable &idents);
-
/// \brief Attach an external AST source to the AST context.
///
/// The external AST source provides the ability to load parts of
@@ -455,6 +446,14 @@ public:
TemplateName getDependentTemplateName(NestedNameSpecifier *NNS,
const IdentifierInfo *Name);
+ enum GetBuiltinTypeError {
+ GE_None, //< No error
+ GE_Missing_FILE //< Missing the FILE type from <stdio.h>
+ };
+
+ /// GetBuiltinType - Return the type for the specified builtin.
+ QualType GetBuiltinType(unsigned ID, GetBuiltinTypeError &Error);
+
private:
QualType getFromTargetType(unsigned Type) const;