Question regarding C++ frontend

2008-05-02 Thread Peter Collingbourne
Hi,

In the C++ frontend, record_types maintain list(s) of the parameters
which were used to instantiate the type, one list for each "level" of
the instantiation.  I would like to know how to determine the list of
parameters that were used to instantiate "this" type e.g. in the case of
a type foo::bar I would like the tree_vec containing the type
"long".  Note that we can't always simply extract the last list of
parameters e.g. for the type foo::baz the tree_vec required would
be empty or null whereas the tree_vec available has a single level for
"int".

Thanks,
-- 
Peter


signature.asc
Description: Digital signature


Re: Question regarding C++ frontend

2008-06-05 Thread Peter Collingbourne
On Sat, May 03, 2008 at 08:29:25AM -0400, Doug Gregor wrote:
> INNERMOST_TEMPLATE_ARGS can be used to get at the "innermost" TREE_VEC
> of template arguments for a class template specialzation such as
> foo::bar. CLASSTYPE_USE_TEMPLATE != 0 tells you whether a
> RECORD_TYPE is actually a template

Doug,

Thank you for your response and sorry for the delay.  Unfortunately
CLASSTYPE_USE_TEMPLATE does not seem to have this property when the
non-template is an inner class of a template.  For example, the
record_type t pertaining to a class outer::inner_noargs :

(gdb) pt
 
no-binfo use_template=1 interface-unknown
chain >
(gdb) print t->type.lang_specific->u.c.use_template
$4 = 1

Thanks,
-- 
Peter


signature.asc
Description: Digital signature