[PATCH] Anonymous namespaces are missing import DW_TAG_imported_module.

David Blaikie dblaikie at gmail.com
Thu Feb 26 23:29:14 PST 2015


The differences you're pointing out are these?

* GCC doesn't put line/file on a namespace, Clang does
* GCC adds DW_AT_sibling, Clang doesn't
* GCC adds line/file on imported_module, Clang doesn't
* GCC omits artificial from the imported_module, Clang doesn't

On those:

* Clang should omit them for brevity
* Clang omits these for brevity, some consumers might find it easier to
parse if they were present
* Clang could add these, I'm not sure if any debugger cares - notionally
they could do more accurate expression evaluation with that information
(not using the using directive when the user is evaluating an expression in
a context lexically prior to the using directive)
* Unlikely to matter.

On Thu, Feb 26, 2015 at 11:11 PM, Katya Romanova <
Katya_Romanova at playstation.sony.com> wrote:

> I wanted to point out that that GCC compiler and LLVM compiler produce
> slightly different DWARF. Is our generation OK?
>
> GCC
> <1><73>: Abbrev Number: 4 (DW_TAG_namespace)
>  <74>   DW_AT_sibling     : <0x82>
> ...
> <1><82>: Abbrev Number: 6 (DW_TAG_imported_module)
>  <83>   DW_AT_decl_file   : 1
>  <84>   DW_AT_decl_line   : 4
>  <85>   DW_AT_import      : <0x73>      [Abbrev Number: 4
> (DW_TAG_namespace)]
>
> LLVM:
> <1><2a>: Abbrev Number: 2 (DW_TAG_namespace)
>  <2b>   DW_AT_decl_file   : 1
>  <2c>   DW_AT_decl_line   : 4
> ...
> <1><47>: Abbrev Number: 4 (DW_TAG_imported_module)
>  <48>   DW_AT_import      : <0x2a>      [Abbrev Number: 2
> (DW_TAG_namespace)]
>  <4c>   DW_AT_artificial  : 1
>
>
> http://reviews.llvm.org/D7895
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150226/d64911a3/attachment.html>


More information about the llvm-commits mailing list