* dwarf2read.c (dwarf2_compute_name): Check that the first
argument is a pointer.
This commit is contained in:
parent
f1078f667a
commit
60430eff89
|
@ -1,3 +1,8 @@
|
||||||
|
2010-09-08 Daniel Jacobowitz <dan@codesourcery.com>
|
||||||
|
|
||||||
|
* dwarf2read.c (dwarf2_compute_name): Check that the first
|
||||||
|
argument is a pointer.
|
||||||
|
|
||||||
2010-09-08 Daniel Jacobowitz <dan@codesourcery.com>
|
2010-09-08 Daniel Jacobowitz <dan@codesourcery.com>
|
||||||
|
|
||||||
* dwarf2read.c (read_func_scope, read_structure_type)
|
* dwarf2read.c (read_func_scope, read_structure_type)
|
||||||
|
|
|
@ -4848,8 +4848,14 @@ dwarf2_compute_name (char *name, struct die_info *die, struct dwarf2_cu *cu,
|
||||||
}
|
}
|
||||||
else if (cu->language == language_cplus)
|
else if (cu->language == language_cplus)
|
||||||
{
|
{
|
||||||
|
/* Assume that an artificial first parameter is
|
||||||
|
"this", but do not crash if it is not. RealView
|
||||||
|
marks unnamed (and thus unused) parameters as
|
||||||
|
artificial; there is no way to differentiate
|
||||||
|
the two cases. */
|
||||||
if (TYPE_NFIELDS (type) > 0
|
if (TYPE_NFIELDS (type) > 0
|
||||||
&& TYPE_FIELD_ARTIFICIAL (type, 0)
|
&& TYPE_FIELD_ARTIFICIAL (type, 0)
|
||||||
|
&& TYPE_CODE (TYPE_FIELD_TYPE (type, 0)) == TYPE_CODE_PTR
|
||||||
&& TYPE_CONST (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, 0))))
|
&& TYPE_CONST (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, 0))))
|
||||||
fputs_unfiltered (" const", buf);
|
fputs_unfiltered (" const", buf);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue