On 06/29/2015 11:36 AM, David Malcolm wrote:
On Thu, 2015-06-25 at 13:18 -0600, Jeff Law wrote:
On 06/25/2015 01:13 PM, David Malcolm wrote:
I found when implementing switch statements for the jit that it
was much easier to work with libiberty's splay-tree.h by first
wrapping it in a C++ wrapper to add typesafety.
This patch adds such a wrapper, implementing the methods I needed.
It's unused in this patch, but is used in the followup patch (which only
touches the jit).
OK for trunk?
gcc/ChangeLog:
* typed-splay-tree.h: New file.
OK.
Well, this is embarrassing, it seems the patch I posted to the list
doesn't actually compile.
It happens. It's one of the reasons why we have the rules around
bootstrap testing :-) I can't count how many of these kinds of goofs
I've made through the years.
The underlying splay_tree_insert returns a splay_tree_node, I had the
typed_splay_tree::insert returning a value_type. I dropped this bogus
return type from the "insert" method in the implementation, in favor of
"void", but I forgot to update the declaration, leading to errors when
attempting to actually compile this (via jit/jit-recording.c in the
followup patch).
The attached one-liner patch drops it from the declaration, and applies
to [PATCH 1/2]. I don't know if I can count this as "obvious"... It
does compile now, and "make check-jit" looks good.
I'd think this qualifies :-)
jeff