Add APIs on SBFunction and SBCompileUnit to inquire about the language type that the function/compile unit is defined in
llvm-svn: 222189
This commit is contained in:
parent
d970702ab3
commit
6cd8e0c9b0
|
@ -78,6 +78,9 @@ public:
|
|||
lldb::SBTypeList
|
||||
GetTypes (uint32_t type_mask = lldb::eTypeClassAny);
|
||||
|
||||
lldb::LanguageType
|
||||
GetLanguage ();
|
||||
|
||||
bool
|
||||
operator == (const lldb::SBCompileUnit &rhs) const;
|
||||
|
||||
|
|
|
@ -58,6 +58,9 @@ public:
|
|||
|
||||
lldb::SBBlock
|
||||
GetBlock ();
|
||||
|
||||
lldb::LanguageType
|
||||
GetLanguage ();
|
||||
|
||||
bool
|
||||
operator == (const lldb::SBFunction &rhs) const;
|
||||
|
|
|
@ -106,6 +106,9 @@ public:
|
|||
lldb::SBTypeList
|
||||
GetTypes (uint32_t type_mask = lldb::eTypeClassAny);
|
||||
|
||||
lldb::LanguageType
|
||||
GetLanguage ();
|
||||
|
||||
bool
|
||||
GetDescription (lldb::SBStream &description);
|
||||
|
||||
|
|
|
@ -82,6 +82,9 @@ public:
|
|||
|
||||
lldb::SBBlock
|
||||
GetBlock ();
|
||||
|
||||
lldb::LanguageType
|
||||
GetLanguage ();
|
||||
|
||||
bool
|
||||
GetDescription (lldb::SBStream &description);
|
||||
|
|
|
@ -228,6 +228,14 @@ SBCompileUnit::FindSupportFileIndex (uint32_t start_idx, const SBFileSpec &sb_fi
|
|||
return 0;
|
||||
}
|
||||
|
||||
lldb::LanguageType
|
||||
SBCompileUnit::GetLanguage ()
|
||||
{
|
||||
if (m_opaque_ptr)
|
||||
return m_opaque_ptr->GetLanguage();
|
||||
return lldb::eLanguageTypeUnknown;
|
||||
}
|
||||
|
||||
bool
|
||||
SBCompileUnit::IsValid () const
|
||||
{
|
||||
|
|
|
@ -227,5 +227,15 @@ SBFunction::GetBlock ()
|
|||
return sb_block;
|
||||
}
|
||||
|
||||
lldb::LanguageType
|
||||
SBFunction::GetLanguage ()
|
||||
{
|
||||
if (m_opaque_ptr)
|
||||
{
|
||||
if (m_opaque_ptr->GetCompileUnit())
|
||||
return m_opaque_ptr->GetCompileUnit()->GetLanguage();
|
||||
}
|
||||
return lldb::eLanguageTypeUnknown;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue