diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2014-01-03 17:59:55 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2014-01-03 17:59:55 +0000 |
| commit | b190f974c9c0312fa8a6b5a1979722569c27dca8 (patch) | |
| tree | 957d4cef1c89fec492652dd5cf81114d78a7be74 /clang/lib/AST/ASTDumper.cpp | |
| parent | d1199cb4f048ccb3258f742d96caebc6c5fba901 (diff) | |
| download | bcm5719-llvm-b190f974c9c0312fa8a6b5a1979722569c27dca8.tar.gz bcm5719-llvm-b190f974c9c0312fa8a6b5a1979722569c27dca8.zip | |
Fixed a FIXME; created a print method for Selectors that accepts a raw_ostream, and started using it in places it made sense.
No functional changes intended, just API cleanliness.
llvm-svn: 198428
Diffstat (limited to 'clang/lib/AST/ASTDumper.cpp')
| -rw-r--r-- | clang/lib/AST/ASTDumper.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/clang/lib/AST/ASTDumper.cpp b/clang/lib/AST/ASTDumper.cpp index 2f402559f4d..a5591a917da 100644 --- a/clang/lib/AST/ASTDumper.cpp +++ b/clang/lib/AST/ASTDumper.cpp @@ -1838,7 +1838,8 @@ void ASTDumper::dumpCXXTemporary(const CXXTemporary *Temporary) { void ASTDumper::VisitObjCMessageExpr(const ObjCMessageExpr *Node) { VisitExpr(Node); - OS << " selector=" << Node->getSelector().getAsString(); + OS << " selector="; + Node->getSelector().print(OS); switch (Node->getReceiverKind()) { case ObjCMessageExpr::Instance: break; @@ -1860,7 +1861,8 @@ void ASTDumper::VisitObjCMessageExpr(const ObjCMessageExpr *Node) { void ASTDumper::VisitObjCBoxedExpr(const ObjCBoxedExpr *Node) { VisitExpr(Node); - OS << " selector=" << Node->getBoxingMethod()->getSelector().getAsString(); + OS << " selector="; + Node->getBoxingMethod()->getSelector().print(OS); } void ASTDumper::VisitObjCAtCatchStmt(const ObjCAtCatchStmt *Node) { @@ -1879,7 +1881,8 @@ void ASTDumper::VisitObjCEncodeExpr(const ObjCEncodeExpr *Node) { void ASTDumper::VisitObjCSelectorExpr(const ObjCSelectorExpr *Node) { VisitExpr(Node); - OS << " " << Node->getSelector().getAsString(); + OS << " "; + Node->getSelector().print(OS); } void ASTDumper::VisitObjCProtocolExpr(const ObjCProtocolExpr *Node) { @@ -1893,13 +1896,13 @@ void ASTDumper::VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *Node) { if (Node->isImplicitProperty()) { OS << " Kind=MethodRef Getter=\""; if (Node->getImplicitPropertyGetter()) - OS << Node->getImplicitPropertyGetter()->getSelector().getAsString(); + Node->getImplicitPropertyGetter()->getSelector().print(OS); else OS << "(null)"; OS << "\" Setter=\""; if (ObjCMethodDecl *Setter = Node->getImplicitPropertySetter()) - OS << Setter->getSelector().getAsString(); + Setter->getSelector().print(OS); else OS << "(null)"; OS << "\""; @@ -1926,7 +1929,7 @@ void ASTDumper::VisitObjCSubscriptRefExpr(const ObjCSubscriptRefExpr *Node) { else OS << " Kind=DictionarySubscript GetterForDictionary=\""; if (Node->getAtIndexMethodDecl()) - OS << Node->getAtIndexMethodDecl()->getSelector().getAsString(); + Node->getAtIndexMethodDecl()->getSelector().print(OS); else OS << "(null)"; @@ -1935,7 +1938,7 @@ void ASTDumper::VisitObjCSubscriptRefExpr(const ObjCSubscriptRefExpr *Node) { else OS << "\" SetterForDictionary=\""; if (Node->setAtIndexMethodDecl()) - OS << Node->setAtIndexMethodDecl()->getSelector().getAsString(); + Node->setAtIndexMethodDecl()->getSelector().print(OS); else OS << "(null)"; } |

