r189600 - Debug Info: generate a unique identifier for C++ struct, class, union, and enum.

Manman Ren manman.ren at gmail.com
Fri Aug 30 15:06:11 PDT 2013


The patch is generating a unique identifier for a debug info type, which
can help debug info type uniquing.
The unique identifier is used internally to remove duplicated debug info
types and should not mess up symbols.

Manman


On Fri, Aug 30, 2013 at 11:14 AM, Arthur O'Dwyer
<arthur.j.odwyer at gmail.com>wrote:

> On Thu, Aug 29, 2013 at 11:51 AM, Manman Ren <manman.ren at gmail.com> wrote:
> > URL: http://llvm.org/viewvc/llvm-project?rev=189600&view=rev
> > "Debug Info: generate a unique identifier for C++ struct, class, union,
> and enum."
> >
> > We use CXX mangler to generate unique identifier for external C++ struct,
> > union, class and enum.
>
> I may be misunderstanding the intent of this patch, but please make
> sure it doesn't cause bad debugger behavior on common code such as
>
>     ==file1.cc==
>     extern class AllPublic;
>     ...
>
>     ==file2.cc==
>     struct AllPublic {   // had been "class ... public:" until we
> realized "struct" was shorter
>         ...
>     };
>
> At least in C++11 (dcl.type.elab#3) the class-keys "class" and
> "struct" may be used interchangeably, so the above code is legal
> C++11, and you should make sure that the debug-info symbols for
> AllPublic in file2.cc match up with the same symbols for AllPublic in
> file1.cc.
>
> (Old versions of Clang had QOI issues with
>     class AllPublic; struct AllPublic { };
> giving false-positive warnings. I don't know for sure that this has been
> fixed.)
>
> -Arthur
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130830/3bf86853/attachment.html>


More information about the cfe-commits mailing list