diff options
| author | Douglas Gregor <dgregor@apple.com> | 2008-10-21 16:13:35 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2008-10-21 16:13:35 +0000 |
| commit | 5251f1b28324a1af9812b5234eeafa904f42706c (patch) | |
| tree | a07a945501d2a4f68bd1e0e36321000c4c6beb9b /clang/lib/AST/DeclBase.cpp | |
| parent | 0747e7e025b3b07f2582739d5df0a5648b05fd5b (diff) | |
| download | bcm5719-llvm-5251f1b28324a1af9812b5234eeafa904f42706c.tar.gz bcm5719-llvm-5251f1b28324a1af9812b5234eeafa904f42706c.zip | |
Preliminary support for function overloading
llvm-svn: 57909
Diffstat (limited to 'clang/lib/AST/DeclBase.cpp')
| -rw-r--r-- | clang/lib/AST/DeclBase.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index 75d6bc6ce9a..686aba2460c 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/lib/AST/DeclBase.cpp @@ -31,6 +31,7 @@ static unsigned nCXXSUC = 0; static unsigned nEnumConst = 0; static unsigned nEnumDecls = 0; static unsigned nNamespaces = 0; +static unsigned nOverFuncs = 0; static unsigned nTypedef = 0; static unsigned nFieldDecls = 0; static unsigned nCXXFieldDecls = 0; @@ -63,6 +64,7 @@ const char *Decl::getDeclKindName() const { switch (DeclKind) { default: assert(0 && "Unknown decl kind!"); case Namespace: return "Namespace"; + case OverloadedFunction: return "OverloadedFunction"; case Typedef: return "Typedef"; case Function: return "Function"; case Var: return "Var"; @@ -93,10 +95,13 @@ void Decl::PrintStats() { int(nFuncs+nVars+nParmVars+nFieldDecls+nSUC+nCXXFieldDecls+nCXXSUC+ nEnumDecls+nEnumConst+nTypedef+nInterfaceDecls+nClassDecls+ nMethodDecls+nProtocolDecls+nCategoryDecls+nIvarDecls+ - nAtDefsFieldDecls+nNamespaces)); + nAtDefsFieldDecls+nNamespaces+nOverFuncs)); fprintf(stderr, " %d namespace decls, %d each (%d bytes)\n", nNamespaces, (int)sizeof(NamespaceDecl), int(nNamespaces*sizeof(NamespaceDecl))); + fprintf(stderr, " %d overloaded function decls, %d each (%d bytes)\n", + nOverFuncs, (int)sizeof(OverloadedFunctionDecl), + int(nOverFuncs*sizeof(OverloadedFunctionDecl))); fprintf(stderr, " %d function decls, %d each (%d bytes)\n", nFuncs, (int)sizeof(FunctionDecl), int(nFuncs*sizeof(FunctionDecl))); fprintf(stderr, " %d variable decls, %d each (%d bytes)\n", @@ -192,13 +197,15 @@ void Decl::PrintStats() { nObjCPropertyImplDecl*sizeof(ObjCPropertyImplDecl)+ nLinkageSpecDecl*sizeof(LinkageSpecDecl)+ nFileScopeAsmDecl*sizeof(FileScopeAsmDecl)+ - nNamespaces*sizeof(NamespaceDecl))); + nNamespaces*sizeof(NamespaceDecl)+ + nOverFuncs*sizeof(OverloadedFunctionDecl))); } void Decl::addDeclKind(Kind k) { switch (k) { case Namespace: nNamespaces++; break; + case OverloadedFunction: nOverFuncs++; break; case Typedef: nTypedef++; break; case Function: nFuncs++; break; case Var: nVars++; break; |

