diff options
author | Enrico Granata <egranata@apple.com> | 2014-11-17 23:06:20 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2014-11-17 23:06:20 +0000 |
commit | 6cd8e0c9b0e3009e6e2e4e2b3df86c00389d2e32 (patch) | |
tree | 3afe0cb933abb70dcb2c3938b9e238e2da18eb9d /lldb/source/API/SBFunction.cpp | |
parent | d970702ab3c7bd136b2165a89401fa559967f508 (diff) | |
download | bcm5719-llvm-6cd8e0c9b0e3009e6e2e4e2b3df86c00389d2e32.tar.gz bcm5719-llvm-6cd8e0c9b0e3009e6e2e4e2b3df86c00389d2e32.zip |
Add APIs on SBFunction and SBCompileUnit to inquire about the language type that the function/compile unit is defined in
llvm-svn: 222189
Diffstat (limited to 'lldb/source/API/SBFunction.cpp')
-rw-r--r-- | lldb/source/API/SBFunction.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lldb/source/API/SBFunction.cpp b/lldb/source/API/SBFunction.cpp index 3d185da17f2..bf5e9180a43 100644 --- a/lldb/source/API/SBFunction.cpp +++ b/lldb/source/API/SBFunction.cpp @@ -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; +} |