https://bugs.llvm.org/show_bug.cgi?id=36328

            Bug ID: 36328
           Summary: [DebugInfo] pointless pointer_type
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangb...@nondot.org
          Reporter: paul_robin...@playstation.sony.com
                CC: llvm-bugs@lists.llvm.org

It looks like Clang will add 'void *' to the retainedTypes even if
there are no references to it elsewhere in the metadata.

######################
$ cat t.c
void k(void *);
void g() {
  int count = 2;
  k((void *)&count);
}
$ clang -c -g t.c -S -emit-llvm
######################

In the IR, I see:

!0 = distinct !DICompileUnit(..., retainedTypes: !3)
!3 = !{!4}
!4 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)

But there are no other uses of !4.
If I change 'void *' to 'int *' the pointer_type goes away.

Note that k() is not described in the metadata, regardless.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to