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:
Enrico Granata
2014-11-17 23:06:20 +00:00
parent d970702ab3
commit 6cd8e0c9b0
6 changed files with 30 additions and 0 deletions

View File

@@ -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;
}