[PATCH] D99411: [debug-info] Emit DW_AT_byte_size for non-default pointer/reference types
    Jessica Clarke via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Jul  2 13:41:54 PDT 2021
    
    
  
jrtc27 added a comment.
In D99411#2856131 <https://reviews.llvm.org/D99411#2856131>, @dblaikie wrote:
> Sounds OK to me - I'm not 100% sure that's the right address size check to do, but if it works for you, sounds OK to me.
Yeah, LLVM suffers from having lots of granularity with no notion of a default address space... for us they're all (program, alloca, globals) the same
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp:771
 
-  // Add size if non-zero (derived types might be zero-sized.)
-  if (Size && Tag != dwarf::DW_TAG_pointer_type
-           && Tag != dwarf::DW_TAG_ptr_to_member_type
-           && Tag != dwarf::DW_TAG_reference_type
-           && Tag != dwarf::DW_TAG_rvalue_reference_type)
+  // Add size if non-zero or non-default (derived types might be zero-sized.)
+  if (Size && ((Tag != dwarf::DW_TAG_pointer_type &&
----------------
Hm, this doesn't really accurately reflect what's happening, but the same is true of the existing comment... maybe something like this?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99411/new/
https://reviews.llvm.org/D99411
    
    
More information about the llvm-commits
mailing list