pxli168 created this revision. pxli168 added reviewers: Anastasia, yaxunl. pxli168 added subscribers: bader, cfe-commits.
Fix the dump of PipeType. Now we will have "pipe int" and element type. http://reviews.llvm.org/D19524 Files: lib/AST/ASTDumper.cpp lib/AST/TypePrinter.cpp Index: lib/AST/TypePrinter.cpp =================================================================== --- lib/AST/TypePrinter.cpp +++ lib/AST/TypePrinter.cpp @@ -895,7 +895,8 @@ void TypePrinter::printPipeBefore(const PipeType *T, raw_ostream &OS) { IncludeStrongLifetimeRAII Strong(Policy); - OS << "pipe"; + OS << "pipe "; + print(T->getElementType(), OS, StringRef()); spaceBeforePlaceHolder(OS); } Index: lib/AST/ASTDumper.cpp =================================================================== --- lib/AST/ASTDumper.cpp +++ lib/AST/ASTDumper.cpp @@ -404,6 +404,9 @@ void VisitAtomicType(const AtomicType *T) { dumpTypeAsChild(T->getValueType()); } + void VisitPipeType(const PipeType *T) { + dumpTypeAsChild(T->getElementType()); + } void VisitAdjustedType(const AdjustedType *T) { dumpTypeAsChild(T->getOriginalType()); }
Index: lib/AST/TypePrinter.cpp =================================================================== --- lib/AST/TypePrinter.cpp +++ lib/AST/TypePrinter.cpp @@ -895,7 +895,8 @@ void TypePrinter::printPipeBefore(const PipeType *T, raw_ostream &OS) { IncludeStrongLifetimeRAII Strong(Policy); - OS << "pipe"; + OS << "pipe "; + print(T->getElementType(), OS, StringRef()); spaceBeforePlaceHolder(OS); } Index: lib/AST/ASTDumper.cpp =================================================================== --- lib/AST/ASTDumper.cpp +++ lib/AST/ASTDumper.cpp @@ -404,6 +404,9 @@ void VisitAtomicType(const AtomicType *T) { dumpTypeAsChild(T->getValueType()); } + void VisitPipeType(const PipeType *T) { + dumpTypeAsChild(T->getElementType()); + } void VisitAdjustedType(const AdjustedType *T) { dumpTypeAsChild(T->getOriginalType()); }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits