Author: enrico Date: Mon Oct 26 20:10:35 2015 New Revision: 251376 URL: http://llvm.org/viewvc/llvm-project?rev=251376&view=rev Log: Add calls to the SB API to access the multi-language formatter category feature
Modified: lldb/trunk/include/lldb/API/SBTypeCategory.h lldb/trunk/scripts/interface/SBTypeCategory.i lldb/trunk/source/API/SBTypeCategory.cpp Modified: lldb/trunk/include/lldb/API/SBTypeCategory.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTypeCategory.h?rev=251376&r1=251375&r2=251376&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBTypeCategory.h (original) +++ lldb/trunk/include/lldb/API/SBTypeCategory.h Mon Oct 26 20:10:35 2015 @@ -36,6 +36,15 @@ namespace lldb { const char* GetName(); + lldb::LanguageType + GetLanguageAtIndex (uint32_t idx); + + uint32_t + GetNumLanguages (); + + void + AddLanguage (lldb::LanguageType language); + bool GetDescription (lldb::SBStream &description, lldb::DescriptionLevel description_level); Modified: lldb/trunk/scripts/interface/SBTypeCategory.i URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBTypeCategory.i?rev=251376&r1=251375&r2=251376&view=diff ============================================================================== --- lldb/trunk/scripts/interface/SBTypeCategory.i (original) +++ lldb/trunk/scripts/interface/SBTypeCategory.i Mon Oct 26 20:10:35 2015 @@ -35,6 +35,15 @@ namespace lldb { const char* GetName(); + lldb::LanguageType + GetLanguageAtIndex (uint32_t idx); + + uint32_t + GetNumLanguages (); + + void + AddLanguage (lldb::LanguageType language); + bool GetDescription (lldb::SBStream &description, lldb::DescriptionLevel description_level); Modified: lldb/trunk/source/API/SBTypeCategory.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTypeCategory.cpp?rev=251376&r1=251375&r2=251376&view=diff ============================================================================== --- lldb/trunk/source/API/SBTypeCategory.cpp (original) +++ lldb/trunk/source/API/SBTypeCategory.cpp Mon Oct 26 20:10:35 2015 @@ -79,6 +79,29 @@ SBTypeCategory::GetName() return m_opaque_sp->GetName(); } +lldb::LanguageType +SBTypeCategory::GetLanguageAtIndex (uint32_t idx) +{ + if (IsValid()) + return m_opaque_sp->GetLanguageAtIndex(idx); + return lldb::eLanguageTypeUnknown; +} + +uint32_t +SBTypeCategory::GetNumLanguages () +{ + if (IsValid()) + return m_opaque_sp->GetNumLanguages(); + return 0; +} + +void +SBTypeCategory::AddLanguage (lldb::LanguageType language) +{ + if (IsValid()) + m_opaque_sp->AddLanguage(language); +} + uint32_t SBTypeCategory::GetNumFormats () { _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits