This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR debug/7081: emit DW_TAG_class_type and DW_TAG_interface_type


Ian Lance Taylor wrote:

>>>> We've long output C++ classes and Java classes and interfaces as
>>>> DW_TAG_structure_type.  This patch fixes it, with a different approach
>>>> from the one proposed at
>>>> http://gcc.gnu.org/ml/gcc-patches/2003-06/msg01748.html

> In general I think it would be better for the middle-end to have a
> better knowledge of these details.  That will permit generic
> implementations of devirtualization, for instance.  But I won't block
> this patch on those grounds.

I'd have gone with a bit in the middle-end representation as well, in
part because it would just have been less code.  (Just have zero mean
"struct", and have the C++/Java front-ends set the bit.)

But, I don't really see any problem with this as it's the kind of
langhook that doesn't affect interpretation of the IR.  (There is no
completely-right LTO answer, BTW; people will have "struct S" in C and
"class C" in C++, meaning them to be the same thing...)

So, this patch is OK.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]