brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · de6c54c Raw
25 lines · plain
1STRING_EXTENSION_OUTSIDE(SBCompileUnit)2 3%extend lldb::SBCompileUnit {4#ifdef SWIGPYTHON5    %pythoncode %{6        # operator== is a free function, which swig does not handle, so we inject7        # our own equality operator here8        def __eq__(self, other):9            return not self.__ne__(other)10 11        def __iter__(self):12            '''Iterate over all line entries in a lldb.SBCompileUnit object.'''13            return lldb_iter(self, 'GetNumLineEntries', 'GetLineEntryAtIndex')14 15        def __len__(self):16            '''Return the number of line entries in a lldb.SBCompileUnit17            object.'''18            return self.GetNumLineEntries()19 20        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.''')21        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.''')22    %}23#endif24}25