diff options
| author | Steve Naroff <snaroff@apple.com> | 2007-09-16 16:16:00 +0000 |
|---|---|---|
| committer | Steve Naroff <snaroff@apple.com> | 2007-09-16 16:16:00 +0000 |
| commit | 2f742085f51fb2c63b1ab65ce155f3d73c5e0c20 (patch) | |
| tree | 241b86e50f5441738f2b93ed649894a134b9b8e3 /clang/AST/Decl.cpp | |
| parent | 66356bda5d49f1b4c65a92c628a3ef08a4351edc (diff) | |
| download | bcm5719-llvm-2f742085f51fb2c63b1ab65ce155f3d73c5e0c20.tar.gz bcm5719-llvm-2f742085f51fb2c63b1ab65ce155f3d73c5e0c20.zip | |
Fixes/tweaks that prevent "defaults-i.m" from compiling.
- Allow classnames as the receiver (removing a FIXME from ParseObjCMessageExpression).
- Added a FIXME to ParseObjCMessageExpression()...we need to return a message expr AST node!
llvm-svn: 42001
Diffstat (limited to 'clang/AST/Decl.cpp')
| -rw-r--r-- | clang/AST/Decl.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/clang/AST/Decl.cpp b/clang/AST/Decl.cpp index 965ba2180a4..4b464ee5e6e 100644 --- a/clang/AST/Decl.cpp +++ b/clang/AST/Decl.cpp @@ -28,6 +28,42 @@ static unsigned nFieldDecls = 0; static unsigned nInterfaceDecls = 0; static bool StatSwitch = false; +const char *Decl::getDeclKindName() { + switch (DeclKind) { + default: assert(0 && "Unknown decl kind!"); + case Typedef: + return "Typedef"; + case Function: + return "Function"; + case BlockVariable: + return "BlockVariable"; + case FileVariable: + return "FileVariable"; + case ParmVariable: + return "ParmVariable"; + case EnumConstant: + return "EnumConstant"; + case ObjcInterface: + return "ObjcInterface"; + case ObjcClass: + return "ObjcClass"; + case ObjcMethod: + return "ObjcMethod"; + case ObjcProtoMethod: + return "ObjcProtoMethod"; + case ObjcProtocol: + return "ObjcProtocol"; + case Struct: + return "Struct"; + case Union: + return "Union"; + case Class: + return "Class"; + case Enum: + return "Enum"; + } +} + bool Decl::CollectingStats(bool enable) { if (enable) StatSwitch = true; return StatSwitch; |

