Closed mewmew closed 8 years ago
Clang seems to be using getelementptr constant expression for global variables, and getelementptr instructions for local variables. Mimic this behaviour to facilitate testing.
getelementptr
Relevant test cases:
testdata/extra/irgen/global_array_arg.c
testdata/extra/irgen/global_array_ident_use.c
testdata/extra/irgen/global_array_param.c
testdata/extra/irgen/global_index_expr_use.c
testdata/extra/irgen/global_index_expr_def.c
Fixed as of commit dbec8c9.
Clang seems to be using
getelementptr
constant expression for global variables, andgetelementptr
instructions for local variables. Mimic this behaviour to facilitate testing.Relevant test cases:
testdata/extra/irgen/global_array_arg.c
testdata/extra/irgen/global_array_ident_use.c
testdata/extra/irgen/global_array_param.c
testdata/extra/irgen/global_index_expr_use.c
testdata/extra/irgen/global_index_expr_def.c