mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-27 15:14:31 +00:00
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
This commit is contained in:
1 parent
531c085815
commit
873a7a4b64
4 files changed
+86
No files matched your search
@@ -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 ()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user