aboutsummaryrefslogtreecommitdiff
path: root/AST/Decl.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-12 07:05:38 +0000
committerChris Lattner <sabre@nondot.org>2008-01-12 07:05:38 +0000
commitc6fdc34ac0183bfa03d65f317c78b7bdac52897e (patch)
tree383d24d2b5b8409ea360110b89b48d1e395b9017 /AST/Decl.cpp
parente41b7cd768fe5722c1adcf4056d586c59514ec29 (diff)
Add first pieces of support for parsing and representing
extern "C" in C++ mode. Patch by Mike Stump! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45904 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'AST/Decl.cpp')
-rw-r--r--AST/Decl.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/AST/Decl.cpp b/AST/Decl.cpp
index f67d7124f5..bf1ffee832 100644
--- a/AST/Decl.cpp
+++ b/AST/Decl.cpp
@@ -37,6 +37,7 @@ static unsigned nObjCImplementationDecls = 0;
static unsigned nObjCCategoryImpl = 0;
static unsigned nObjCCompatibleAlias = 0;
static unsigned nObjCPropertyDecl = 0;
+static unsigned nLinkageSpecDecl = 0;
static bool StatSwitch = false;
@@ -156,7 +157,9 @@ void Decl::PrintStats() {
nFileVars*sizeof(FileVarDecl)+nParmVars*sizeof(ParmVarDecl)+
nFieldDecls*sizeof(FieldDecl)+nSUC*sizeof(RecordDecl)+
nEnumDecls*sizeof(EnumDecl)+nEnumConst*sizeof(EnumConstantDecl)+
- nTypedef*sizeof(TypedefDecl)) /* FIXME: add ObjC decls */);
+ nTypedef*sizeof(TypedefDecl)+
+ nLinkageSpecDecl*sizeof(LinkageSpecDecl))
+ /* FIXME: add ObjC decls */);
}
void Decl::addDeclKind(const Kind k) {
@@ -223,6 +226,9 @@ void Decl::addDeclKind(const Kind k) {
case PropertyDecl:
nObjCPropertyDecl++;
break;
+ case LinkageSpec:
+ nLinkageSpecDecl++;
+ break;
}
}