diff options
author | Johnny Chen <johnny.chen@apple.com> | 2012-03-16 20:46:10 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2012-03-16 20:46:10 +0000 |
commit | 873a7a4b64353cd0e7b018abe19a2ea5a567e427 (patch) | |
tree | eaf2e7ff3565e051e0b6c72a697b9d3a42bcf095 /lldb/source/API/SBModule.cpp | |
parent | 531c085815e6e590c670e569f5d4f76917f3559d (diff) | |
download | llvm-873a7a4b64353cd0e7b018abe19a2ea5a567e427.zip llvm-873a7a4b64353cd0e7b018abe19a2ea5a567e427.tar.gz llvm-873a7a4b64353cd0e7b018abe19a2ea5a567e427.tar.bz2 |
Patch from dawn@burble.org:
GetSupportFileAtIndex(), GetNumSupportFiles(), FindSupportFileIndex():
Add API support for getting the list of files in a compilation unit.
GetNumCompileUnits(), GetCompileUnitAtIndex():
Add API support for retrieving the compilation units in a module.
llvm-svn: 152942
Diffstat (limited to 'lldb/source/API/SBModule.cpp')
-rw-r--r-- | lldb/source/API/SBModule.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lldb/source/API/SBModule.cpp b/lldb/source/API/SBModule.cpp index c23a35e..3090fb4 100644 --- a/lldb/source/API/SBModule.cpp +++ b/lldb/source/API/SBModule.cpp @@ -266,6 +266,30 @@ SBModule::GetDescription (SBStream &description) return true; } +uint32_t +SBModule::GetNumCompileUnits() +{ + ModuleSP module_sp (GetSP ()); + if (module_sp) + { + return module_sp->GetNumCompileUnits (); + } + return 0; +} + +SBCompileUnit +SBModule::GetCompileUnitAtIndex (uint32_t index) +{ + SBCompileUnit sb_cu; + ModuleSP module_sp (GetSP ()); + if (module_sp) + { + CompUnitSP cu_sp = module_sp->GetCompileUnitAtIndex (index); + sb_cu.reset(cu_sp.get()); + } + return sb_cu; +} + size_t SBModule::GetNumSymbols () { |