Commit 0d7880da authored by dbarbera's avatar dbarbera
Browse files

Fixed SeqOf indexing

parent 48454d19
......@@ -614,8 +614,8 @@ def _prim_path_reference(prim):
idx_val = expression(elem['index'][0])
array_ptr = g.builder.gep(var_ptr, [g.zero, g.zero])
# TODO: Refactor this
if array_ptr.type.pointee.kind != core.TYPE_VECTOR:
# If is not a vector this is a pointer to a variable size SeqOf
if array_ptr.type.pointee.kind != core.TYPE_ARRAY:
# If is not an array this is a pointer to a variable size SeqOf
# The array is in the second field of the struct
var_ptr = g.builder.gep(var_ptr, [g.zero, g.one, idx_val])
else:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment