From: Steve Naroff Date: Fri, 23 May 2008 00:59:14 +0000 (+0000) Subject: Tweak AST dumper for ObjC ivars. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=466c2e3af049964f3a573917bd04d6b6ce1d121d;p=clang Tweak AST dumper for ObjC ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51463 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 02d86a32fc..7c44a20c2e 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -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"; diff --git a/lib/AST/StmtDumper.cpp b/lib/AST/StmtDumper.cpp index 77fbad5faa..8621ba68f5 100644 --- a/lib/AST/StmtDumper.cpp +++ b/lib/AST/StmtDumper.cpp @@ -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) {