aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclCXX.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-02-04 19:02:06 +0000
committerDouglas Gregor <dgregor@apple.com>2009-02-04 19:02:06 +0000
commitaaba5e346dffdbad5d1c42765a89e4a7afb0da67 (patch)
tree0bbf6ad0ff4609acaca0df33e72e02ba03d85235 /lib/AST/DeclCXX.cpp
parent0e8aaaf67b0c172e5a55cded30b80a83d3bd477f (diff)
Basic representation of C++ class templates, from Andrew Sutton.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclCXX.cpp')
-rw-r--r--lib/AST/DeclCXX.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp
index 5e1875ab65..6de575411b 100644
--- a/lib/AST/DeclCXX.cpp
+++ b/lib/AST/DeclCXX.cpp
@@ -21,36 +21,6 @@ using namespace clang;
// Decl Allocation/Deallocation Method Implementations
//===----------------------------------------------------------------------===//
-TemplateTypeParmDecl *
-TemplateTypeParmDecl::Create(ASTContext &C, DeclContext *DC,
- SourceLocation L, IdentifierInfo *Id,
- bool Typename) {
- return new (C) TemplateTypeParmDecl(DC, L, Id, Typename);
-}
-
-NonTypeTemplateParmDecl *
-NonTypeTemplateParmDecl::Create(ASTContext &C, DeclContext *DC,
- SourceLocation L, IdentifierInfo *Id,
- QualType T, SourceLocation TypeSpecStartLoc) {
- return new (C) NonTypeTemplateParmDecl(DC, L, Id, T, TypeSpecStartLoc);
-}
-
-TemplateParameterList::TemplateParameterList(Decl **Params, unsigned NumParams)
- : NumParams(NumParams) {
- for (unsigned Idx = 0; Idx < NumParams; ++Idx)
- begin()[Idx] = Params[Idx];
-}
-
-TemplateParameterList *
-TemplateParameterList::Create(ASTContext &C, Decl **Params,
- unsigned NumParams) {
- // FIXME: how do I pass in Size to ASTContext::new?
- unsigned Size = sizeof(TemplateParameterList) + sizeof(Decl *) * NumParams;
- unsigned Align = llvm::AlignOf<TemplateParameterList>::Alignment;
- void *Mem = C.Allocate(Size, Align);
- return new (Mem) TemplateParameterList(Params, NumParams);
-}
-
CXXRecordDecl::CXXRecordDecl(TagKind TK, DeclContext *DC,
SourceLocation L, IdentifierInfo *Id)
: RecordDecl(CXXRecord, TK, DC, L, Id),