forked from OSchip/llvm-project
Add a dump function to Stmt that takes only an output stream. No functionality change.
This allows dumping to any given output stream but without requiring a SourceManager, similar to the interface provided by Decl. It's useful when writing certain generic debug functions, external to the clang code base (for e.g.). llvm-svn: 232912
This commit is contained in:
parent
bbb4cec2e8
commit
2da8ed9241
|
@ -374,6 +374,7 @@ public:
|
|||
void dump() const;
|
||||
void dump(SourceManager &SM) const;
|
||||
void dump(raw_ostream &OS, SourceManager &SM) const;
|
||||
void dump(raw_ostream &OS) const;
|
||||
|
||||
/// dumpColor - same as dump(), but forces color highlighting.
|
||||
void dumpColor() const;
|
||||
|
|
|
@ -2294,6 +2294,11 @@ LLVM_DUMP_METHOD void Stmt::dump(raw_ostream &OS, SourceManager &SM) const {
|
|||
P.dumpStmt(this);
|
||||
}
|
||||
|
||||
LLVM_DUMP_METHOD void Stmt::dump(raw_ostream &OS) const {
|
||||
ASTDumper P(OS, nullptr, nullptr);
|
||||
P.dumpStmt(this);
|
||||
}
|
||||
|
||||
LLVM_DUMP_METHOD void Stmt::dump() const {
|
||||
ASTDumper P(llvm::errs(), nullptr, nullptr);
|
||||
P.dumpStmt(this);
|
||||
|
|
Loading…
Reference in New Issue