@@ -1,3 +1,13 @@
+2013-10-24 David Malcolm <dmalcolm@redhat.com>
+
+ * internal-api.c (gcc::jit::function::add_eval): Handle non-NULL
+ locations.
+ (gcc::jit::context::handle_locations): Fix test for the various
+ kinds of declarations, replacing use of DECL_MINIMAL_CHECK,
+ which aborts on failure (such as if we saw a type).
+ * libgccjit.h (GCC_JIT_BOOL_OPTION_DEBUGINFO): Fix out-of-date
+ comment.
+
2013-10-23 David Malcolm <dmalcolm@redhat.com>
* internal-api.c: Update for rename of tree-flow.h to tree-cfg.h
@@ -883,10 +883,12 @@ gcc::jit::function::
add_eval (location *loc,
rvalue *rvalue)
{
- gcc_assert (NULL == loc);
gcc_assert (rvalue);
gcc_assert (m_kind != GCC_JIT_FUNCTION_IMPORTED);
+ if (loc)
+ set_tree_location (rvalue->as_tree (), loc);
+
tsi_link_after (&m_stmt_iter, rvalue->as_tree (), TSI_CONTINUE_LINKING);
}
@@ -1444,7 +1446,7 @@ handle_locations ()
/* This covers expressions: */
if (CAN_HAVE_LOCATION_P (t))
SET_EXPR_LOCATION (t, srcloc);
- else if (DECL_MINIMAL_CHECK (t))
+ else if (CODE_CONTAINS_STRUCT(TREE_CODE(t), TS_DECL_MINIMAL))
DECL_SOURCE_LOCATION (t) = srcloc;
else
{
@@ -144,8 +144,8 @@ enum gcc_jit_bool_option
be able to inspect variables and step through your code.
Note that you can't step through code unless you set up source
- location information for the code, and that isn't yet supported
- in the API. */
+ location information for the code (by creating and passing in
+ gcc_jit_location instances). */
GCC_JIT_BOOL_OPTION_DEBUGINFO,
/* If true, gcc_jit_context_compile will dump its initial "tree"