Merge pull request #22686 from brentdax/what-a-dump

Add ASTNode.dump() methods
This commit is contained in:
Brent Royal-Gordon
2019-02-18 15:03:56 -08:00
committed by GitHub
2 changed files with 24 additions and 0 deletions

View File

@@ -20,6 +20,10 @@
#include "llvm/ADT/PointerUnion.h"
#include "swift/AST/TypeAlignments.h"
namespace llvm {
class raw_ostream;
}
namespace swift {
class Expr;
class Stmt;
@@ -57,6 +61,11 @@ namespace swift {
FUNC(Expr)
FUNC(Decl)
#undef FUNC
LLVM_ATTRIBUTE_DEPRECATED(
void dump() const LLVM_ATTRIBUTE_USED,
"only for use within the debugger");
void dump(llvm::raw_ostream &OS, unsigned Indent = 0) const;
/// Whether the AST node is implicit.
bool isImplicit() const;