ASTDumper.h revision e6ea5fe8e76b028a0565bc01543bc15f8c120e8a
1//===-- ASTDumper.h ---------------------------------------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9 10#include "clang/AST/DeclVisitor.h" 11#include "clang/AST/StmtVisitor.h" 12#include "clang/AST/TypeVisitor.h" 13 14#include "lldb/Core/Stream.h" 15#include "llvm/ADT/DenseSet.h" 16 17namespace lldb_private 18{ 19 20class ASTDumper 21{ 22public: 23 ASTDumper (clang::Decl *decl); 24 ASTDumper (clang::DeclContext *decl_ctx); 25 ASTDumper (const clang::Type *type); 26 ASTDumper (clang::QualType type); 27 ASTDumper (lldb::clang_type_t type); 28 29 const char *GetCString(); 30 void ToSTDERR(); 31 void ToLog(lldb::LogSP &log, const char *prefix); 32 void ToStream(lldb::StreamSP &stream); 33private: 34 std::string m_dump; 35}; 36 37} // namespace lldb_private 38