Example #1
0
 def __init__(self, module, ftype, name):
     assert isinstance(ftype, types.Type)
     super(Function, self).__init__(module, ftype.as_pointer(), name=name)
     self.ftype = ftype
     self.scope = _utils.NameScope()
     self.blocks = []
     self.attributes = FunctionAttributes()
     self.args = tuple([Argument(self, t) for t in ftype.args])
     self.return_value = ReturnValue(self, ftype.return_type)
     self.parent.add_global(self)
     self.calling_convention = ''
Example #2
0
 def __init__(self, name='', context=context.global_context):
     self.context = context
     self.name = name   # name is for debugging/informational
     self.data_layout = ""
     self.scope = _utils.NameScope()
     self.triple = 'unknown-unknown-unknown'
     self.globals = collections.OrderedDict()
     # Innamed metadata nodes.
     self.metadata = []
     # Named metadata nodes
     self.namedmetadata = {}
     # Cache for metadata node deduplication
     self._metadatacache = {}
Example #3
0
 def __init__(self):
     self.scope = _utils.NameScope()
     self.identified_types = {}