'Get a field at the given position or the fieldname
Args
builder:
LLVM IRBuilder
val:
value to be inserted
pos: int or str
field index or field name
Returns
Extracted value'

def get(self, builder, val, pos):

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