1 STRING_EXTENSION_OUTSIDE(SBCompileUnit)
2 
3 %extend lldb::SBCompileUnit {
4 #ifdef SWIGPYTHON
5     %pythoncode %{
6         def __iter__(self):
7             '''Iterate over all line entries in a lldb.SBCompileUnit object.'''
8             return lldb_iter(self, 'GetNumLineEntries', 'GetLineEntryAtIndex')
9 
10         def __len__(self):
11             '''Return the number of line entries in a lldb.SBCompileUnit
12             object.'''
13             return self.GetNumLineEntries()
14 
15         file = property(GetFileSpec, None, doc='''A read only property that returns the same result an lldb object that represents the source file (lldb.SBFileSpec) for the compile unit.''')
16         num_line_entries = property(GetNumLineEntries, None, doc='''A read only property that returns the number of line entries in a compile unit as an integer.''')
17     %}
18 #endif
19 }
20