From 332a9f7636ca2a49be3a6ee9c610c5dba9e7e2da Mon Sep 17 00:00:00 2001 From: Petter Tomner Date: Thu, 9 Sep 2021 00:50:06 +0200 Subject: 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 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.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/jit/jit-playback.h') diff --git a/gcc/jit/jit-playback.h b/gcc/jit/jit-playback.h index 825a3e1..f670c9e 100644 --- a/gcc/jit/jit-playback.h +++ b/gcc/jit/jit-playback.h @@ -271,8 +271,13 @@ private: source_file * get_source_file (const char *filename); + tree + get_tree_node_for_type (enum gcc_jit_types type_); + void handle_locations (); + void init_types (); + const char * get_path_c_file () const; const char * get_path_s_file () const; const char * get_path_so_file () const; -- cgit v1.1