diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-09-09 11:28:23 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-09-09 11:28:23 +0000 |
commit | a626a3d0fb74455651f742c0938902a42e6e71c8 (patch) | |
tree | 54992f8e4bb6788b27ccba4ad99ff512972c0589 /lib/AST/Decl.cpp | |
parent | 89b06584402a38933e108b66ded3a168cd492dff (diff) |
Fix C++ PCH issue.
Another beating by boost in this test case: http://llvm.org/PR8117
A function specialization wasn't properly initialized if it wasn't canonical.
I wish there was a nice little test case but this was boost.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113481 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index b2beb131c5..2f3c006867 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -1376,14 +1376,10 @@ FunctionDecl::setFunctionTemplateSpecialization(ASTContext &C, FunctionTemplateSpecializationInfo *Info = TemplateOrSpecialization.dyn_cast<FunctionTemplateSpecializationInfo*>(); if (!Info) - Info = new (C) FunctionTemplateSpecializationInfo; - - Info->Function = this; - Info->Template.setPointer(Template); - Info->Template.setInt(TSK - 1); - Info->TemplateArguments = TemplateArgs; - Info->TemplateArgumentsAsWritten = TemplateArgsAsWritten; - Info->PointOfInstantiation = PointOfInstantiation; + Info = FunctionTemplateSpecializationInfo::Create(C, this, Template, TSK, + TemplateArgs, + TemplateArgsAsWritten, + PointOfInstantiation); TemplateOrSpecialization = Info; // Insert this function template specialization into the set of known |