diff options
| author | John McCall <rjmccall@apple.com> | 2010-06-11 11:07:21 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-06-11 11:07:21 +0000 |
| commit | 773cc98c3abb11e5f91197d5aa42944c476e7f06 (patch) | |
| tree | c3b291de2ed7686ff2ba63c73b9dd1c337d2a027 /clang/lib/AST/ASTContext.cpp | |
| parent | b9639aaed4ef98becf413b9d52680686f8f22ca1 (diff) | |
| download | bcm5719-llvm-773cc98c3abb11e5f91197d5aa42944c476e7f06.tar.gz bcm5719-llvm-773cc98c3abb11e5f91197d5aa42944c476e7f06.zip | |
Don't store ASTContext references in the TST nodes just to support profiling.
llvm-svn: 105820
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
| -rw-r--r-- | clang/lib/AST/ASTContext.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index e2074e8b741..065ebe9f9a0 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -40,6 +40,8 @@ ASTContext::ASTContext(const LangOptions& LOpts, SourceManager &SM, IdentifierTable &idents, SelectorTable &sels, Builtin::Context &builtins, bool FreeMem, unsigned size_reserve) : + TemplateSpecializationTypes(this_()), + DependentTemplateSpecializationTypes(this_()), GlobalNestedNameSpecifier(0), CFConstantStringTypeDecl(0), NSConstantStringTypeDecl(0), ObjCFastEnumerationStateTypeDecl(0), FILEDecl(0), jmp_bufDecl(0), @@ -1824,7 +1826,7 @@ ASTContext::getTemplateSpecializationType(TemplateName Template, void *Mem = Allocate((sizeof(TemplateSpecializationType) + sizeof(TemplateArgument) * NumArgs), TypeAlignment); - Spec = new (Mem) TemplateSpecializationType(*this, CanonTemplate, false, + Spec = new (Mem) TemplateSpecializationType(CanonTemplate, false, CanonArgs.data(), NumArgs, Canon); Types.push_back(Spec); @@ -1844,7 +1846,7 @@ ASTContext::getTemplateSpecializationType(TemplateName Template, sizeof(TemplateArgument) * NumArgs), TypeAlignment); TemplateSpecializationType *Spec - = new (Mem) TemplateSpecializationType(*this, Template, + = new (Mem) TemplateSpecializationType(Template, IsCurrentInstantiation, Args, NumArgs, Canon); @@ -1970,7 +1972,7 @@ ASTContext::getDependentTemplateSpecializationType( void *Mem = Allocate((sizeof(DependentTemplateSpecializationType) + sizeof(TemplateArgument) * NumArgs), TypeAlignment); - T = new (Mem) DependentTemplateSpecializationType(*this, Keyword, NNS, + T = new (Mem) DependentTemplateSpecializationType(Keyword, NNS, Name, NumArgs, Args, Canon); Types.push_back(T); DependentTemplateSpecializationTypes.InsertNode(T, InsertPos); |

