]> granicus.if.org Git - clang/commitdiff
Tweak AST dumper for ObjC ivars.
authorSteve Naroff <snaroff@apple.com>
Fri, 23 May 2008 00:59:14 +0000 (00:59 +0000)
committerSteve Naroff <snaroff@apple.com>
Fri, 23 May 2008 00:59:14 +0000 (00:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51463 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/Decl.cpp
lib/AST/StmtDumper.cpp

index 02d86a32fccd358b94342c09f07a76f0d025d797..7c44a20c2e7ba20685f82f3322b00991242641da 100644 (file)
@@ -65,6 +65,7 @@ const char *Decl::getDeclKindName() const {
   case Var:                 return "Var";
   case ParmVar:             return "ParmVar";
   case EnumConstant:        return "EnumConstant";
+  case ObjCIvar:            return "ObjCIvar";
   case ObjCInterface:       return "ObjCInterface";
   case ObjCClass:           return "ObjCClass";
   case ObjCMethod:          return "ObjCMethod";
index 77fbad5faa7991df25aa9585ab9987e1f9ec1b85..8621ba68f56635d3cd14b314d47cdc3341aa7db9 100644 (file)
@@ -297,10 +297,10 @@ void StmtDumper::VisitDeclRefExpr(DeclRefExpr *Node) {
 }
 
 void StmtDumper::VisitObjCIvarRefExpr(ObjCIvarRefExpr *Node) {
-  DumpExpr(Node->getBase());
+  DumpExpr(Node);
 
-  fprintf(F, " ObjCIvarRefExpr");
-  fprintf(F, "='%s' %p", Node->getDecl()->getName(), (void*)Node->getDecl());
+  fprintf(F, " %sDecl='%s' %p", Node->getDecl()->getDeclKindName(), 
+                            Node->getDecl()->getName(), (void*)Node->getDecl());
 }
 
 void StmtDumper::VisitPreDefinedExpr(PreDefinedExpr *Node) {