libgccjit: Generate debug info for variables
authorPetter Tomner <tomner@kth.se>
Wed, 8 Sep 2021 22:50:06 +0000 (00:50 +0200)
committerPetter Tomner <tomner@kth.se>
Fri, 10 Sep 2021 23:00:48 +0000 (01:00 +0200)
commit332a9f7636ca2a49be3a6ee9c610c5dba9e7e2da
tree8fd2bb6dc81eedfa6db9a6b65ff17e49ed05a5f4
parent57b7c432cce893e1ba60d9b94a9606df6b419379
libgccjit: Generate debug info for variables

Finalize declares via available helpers after location is set. Set
TYPE_NAME of primitives and friends to "int" etc. Debug info is now
set properly for variables.

Signed-off-by:
2021-09-09 Petter Tomner <tomner@kth.se>

gcc/jit/
* jit-playback.c: Moved global var processing to after loc handling.
  Setting TYPE_NAME for fundamental types.
  Using common functions for finalizing globals.
* jit-playback.h: New method init_types().
  Changed get_tree_node_for_type() to method.

gcc/testsuite/
* jit.dg/test-error-array-bounds.c: Array is not unsigned
* jit.dg/jit.exp: Helper function
* jit.dg/test-debuginfo.c: New testcase
gcc/jit/jit-playback.c
gcc/jit/jit-playback.h
gcc/testsuite/jit.dg/jit.exp
gcc/testsuite/jit.dg/test-debuginfo.c [new file with mode: 0644]
gcc/testsuite/jit.dg/test-error-array-bounds.c