Index: lldb/trunk/include/lldb/Symbol/ClangASTContext.h =================================================================== --- lldb/trunk/include/lldb/Symbol/ClangASTContext.h +++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h @@ -929,6 +929,13 @@ //---------------------------------------------------------------------- // Dumping types //---------------------------------------------------------------------- +#ifndef NDEBUG + /// Convenience LLVM-style dump method for use in the debugger only. + /// In contrast to the other \p Dump() methods this directly invokes + /// \p clang::QualType::dump(). + LLVM_DUMP_METHOD void dump(lldb::opaque_compiler_type_t type) const override; +#endif + void Dump(Stream &s); void DumpValue(lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, Index: lldb/trunk/include/lldb/Symbol/CompilerType.h =================================================================== --- lldb/trunk/include/lldb/Symbol/CompilerType.h +++ lldb/trunk/include/lldb/Symbol/CompilerType.h @@ -388,6 +388,13 @@ //---------------------------------------------------------------------- // Dumping types //---------------------------------------------------------------------- + +#ifndef NDEBUG + /// Convenience LLVM-style dump method for use in the debugger only. + /// Don't call this function from actual code. + LLVM_DUMP_METHOD void dump() const; +#endif + void DumpValue(ExecutionContext *exe_ctx, Stream *s, lldb::Format format, const DataExtractor &data, lldb::offset_t data_offset, size_t data_byte_size, uint32_t bitfield_bit_size, Index: lldb/trunk/include/lldb/Symbol/TypeSystem.h =================================================================== --- lldb/trunk/include/lldb/Symbol/TypeSystem.h +++ lldb/trunk/include/lldb/Symbol/TypeSystem.h @@ -355,6 +355,12 @@ // Dumping types //---------------------------------------------------------------------- +#ifndef NDEBUG + /// Convenience LLVM-style dump method for use in the debugger only. + LLVM_DUMP_METHOD virtual void + dump(lldb::opaque_compiler_type_t type) const = 0; +#endif + virtual void DumpValue(lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, Stream *s, lldb::Format format, const DataExtractor &data, Index: lldb/trunk/source/Symbol/ClangASTContext.cpp =================================================================== --- lldb/trunk/source/Symbol/ClangASTContext.cpp +++ lldb/trunk/source/Symbol/ClangASTContext.cpp @@ -9086,6 +9086,16 @@ //---------------------------------------------------------------------- #define DEPTH_INCREMENT 2 +#ifndef NDEBUG +LLVM_DUMP_METHOD void +ClangASTContext::dump(lldb::opaque_compiler_type_t type) const { + if (!type) + return; + clang::QualType qual_type(GetQualType(type)); + qual_type.dump(); +} +#endif + void ClangASTContext::Dump(Stream &s) { Decl *tu = Decl::castFromDeclContext(GetTranslationUnitDecl()); tu->dump(s.AsRawOstream()); Index: lldb/trunk/source/Symbol/CompilerType.cpp =================================================================== --- lldb/trunk/source/Symbol/CompilerType.cpp +++ lldb/trunk/source/Symbol/CompilerType.cpp @@ -800,6 +800,15 @@ } } +#ifndef NDEBUG +LLVM_DUMP_METHOD void CompilerType::dump() const { + if (IsValid()) + m_type_system->dump(m_type); + else + llvm::errs() << "\n"; +} +#endif + bool CompilerType::GetValueAsScalar(const lldb_private::DataExtractor &data, lldb::offset_t data_byte_offset, size_t data_byte_size,