[PATCH] D80369: [DebugInfo][CallSites] Remove decl subprograms from 'retainedTypes:'

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 27 11:23:13 PDT 2020


dblaikie added a comment.

In D80369#2057077 <https://reviews.llvm.org/D80369#2057077>, @djtodoro wrote:

> >> @dblaikie wrote:
> > 
> > ... At least for the C++ test, this change makes it pass:
> > 
> >   diff --git clang/test/Modules/ModuleDebugInfo.cpp clang/test/Modules/ModuleDebugInfo.cpp
> >   index 26369c89605..b1ffe27ec22 100644
> >   --- clang/test/Modules/ModuleDebugInfo.cpp
> >   +++ clang/test/Modules/ModuleDebugInfo.cpp
> >   @@ -51,15 +51,6 @@
> >    // CHECK-SAME:             )
> >    // CHECK: !DIEnumerator(name: "e5", value: 5, isUnsigned: true)
> >    
> >   -// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "B",
> >   -// no mangled name here yet.
> >   -
> >   -// This type is anchored by a function parameter.
> >   -// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "A<void>"
> >   -// CHECK-SAME:             elements:
> >   -// CHECK-SAME:             templateParams:
> >   -// CHECK-SAME:             identifier: "_ZTSN8DebugCXX1AIJvEEE")
> >   -
> >    // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "Struct"
> >    // CHECK-SAME:             identifier: "_ZTSN8DebugCXX6StructE")
> >    
> >   @@ -85,6 +76,12 @@
> >    // CHECK-SAME:             templateParams:
> >    // CHECK-SAME:             identifier: "_ZTSN8DebugCXX8TemplateIlNS_6traitsIlEEEE")
> >    
> >   +// This type is anchored by a function parameter.
> >   +// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "A<void>"
> >   +// CHECK-SAME:             elements:
> >   +// CHECK-SAME:             templateParams:
> >   +// CHECK-SAME:             identifier: "_ZTSN8DebugCXX1AIJvEEE")
> >   +
> >    // CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "FloatInstantiation"
> >    // no mangled name here yet.
> >    
> >   @@ -93,6 +90,9 @@
> >    // CHECK-SAME:             flags: DIFlagFwdDecl
> >    // CHECK-SAME:             identifier: "_ZTSN8DebugCXX8TemplateIfNS_6traitsIfEEEE")
> >    
> >   +// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "B",
> >   +// no mangled name here yet.
> >   +
> >    // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "Virtual"
> >    // CHECK-SAME:             elements:
> >    // CHECK-SAME:             identifier: "_ZTS7Virtual")
>
> I've also faced this scenario, but the problem was with the `Modules/ModuleDebugInfo.m` (Objective-C) test, since after applying previous version of the patch [0] (plus refacotred Modules/DebugInfoTransitiveImport.m & Modules/ModuleDebugInfo.cpp) there wasn't any `DISubprogram` at all, and that was the reason I made this version of the patch.


Not sure I follow - why was it a problem that there was no DISubprogram at all?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80369/new/

https://reviews.llvm.org/D80369





More information about the cfe-commits mailing list