'Set a field at the given position or the fieldname
Args
builder:
LLVM IRBuilder
stval:
LLVM struct value
val:
value to be inserted
pos: int or str
field index or field name
Returns
A new LLVM struct with the value inserted'

def set(self, builder, stval, val, pos):

    if isinstance(pos, str):
        pos = self.get_field_position(pos)
    return builder.insert_value(stval, val, [pos], name=('inserted.' + self._fields[pos]))
