Reverted because this depended upon an LLVM patch that was reverted because
of test failures on the buildbots.  I'm still investigating the root cause.

SVN revision was rL274628.

On Wed, Jul 6, 2016 at 8:15 AM, Adrian McCarthy via cfe-commits <
cfe-commits@lists.llvm.org> wrote:

> Author: amccarth
> Date: Wed Jul  6 10:15:38 2016
> New Revision: 274633
>
> URL: http://llvm.org/viewvc/llvm-project?rev=274633&view=rev
> Log:
> Revert "Include debug info for nested structs and classes"
>
> This reverts commit 0af5ee9631c7c167dc40498b415876553e314c95.
>
> Modified:
>     cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
>     cfe/trunk/lib/CodeGen/CGDebugInfo.h
>     cfe/trunk/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp
>     cfe/trunk/test/CodeGenCXX/debug-info-indirect-field-decl.cpp
>     cfe/trunk/test/CodeGenCXX/debug-info-ms-abi.cpp
>
> Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=274633&r1=274632&r2=274633&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Wed Jul  6 10:15:38 2016
> @@ -1095,13 +1095,6 @@ void CGDebugInfo::CollectRecordNormalFie
>    elements.push_back(FieldType);
>  }
>
> -void CGDebugInfo::CollectRecordNestedRecord(
> -    const RecordDecl *RD, SmallVectorImpl<llvm::Metadata *> &elements) {
> -  QualType Ty = CGM.getContext().getTypeDeclType(RD);
> -  llvm::DIType *nestedType = getOrCreateType(Ty, getOrCreateMainFile());
> -  elements.push_back(nestedType);
> -}
> -
>  void CGDebugInfo::CollectRecordFields(
>      const RecordDecl *record, llvm::DIFile *tunit,
>      SmallVectorImpl<llvm::Metadata *> &elements,
> @@ -1138,9 +1131,6 @@ void CGDebugInfo::CollectRecordFields(
>
>          // Bump field number for next field.
>          ++fieldNo;
> -      } else if (const auto *nestedRec = dyn_cast<CXXRecordDecl>(I)) {
> -        if (!nestedRec->isImplicit() && nestedRec->getDeclContext() ==
> record)
> -          CollectRecordNestedRecord(nestedRec, elements);
>        }
>    }
>  }
> @@ -3643,8 +3633,8 @@ void CGDebugInfo::EmitUsingDirective(con
>    if (CGM.getCodeGenOpts().getDebugInfo() <
> codegenoptions::LimitedDebugInfo)
>      return;
>    const NamespaceDecl *NSDecl = UD.getNominatedNamespace();
> -  if (!NSDecl->isAnonymousNamespace() ||
> -      CGM.getCodeGenOpts().DebugExplicitImport) {
> +  if (!NSDecl->isAnonymousNamespace() ||
> +      CGM.getCodeGenOpts().DebugExplicitImport) {
>      DBuilder.createImportedModule(
>          getCurrentContextDescriptor(cast<Decl>(UD.getDeclContext())),
>          getOrCreateNameSpace(NSDecl),
>
> Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.h
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.h?rev=274633&r1=274632&r2=274633&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/CGDebugInfo.h (original)
> +++ cfe/trunk/lib/CodeGen/CGDebugInfo.h Wed Jul  6 10:15:38 2016
> @@ -254,8 +254,6 @@ class CGDebugInfo {
>                                  llvm::DIFile *F,
>                                  SmallVectorImpl<llvm::Metadata *> &E,
>                                  llvm::DIType *RecordTy, const RecordDecl
> *RD);
> -  void CollectRecordNestedRecord(const RecordDecl *RD,
> -                                 SmallVectorImpl<llvm::Metadata *> &E);
>    void CollectRecordFields(const RecordDecl *Decl, llvm::DIFile *F,
>                             SmallVectorImpl<llvm::Metadata *> &E,
>                             llvm::DICompositeType *RecordTy);
>
> Modified: cfe/trunk/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp?rev=274633&r1=274632&r2=274633&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp (original)
> +++ cfe/trunk/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp Wed Jul  6
> 10:15:38 2016
> @@ -19,6 +19,6 @@ protected:
>
>  Test t;
>
> -// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "data"
>  // CHECK: !DIDerivedType(tag: DW_TAG_pointer_type
> +// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "data"
>  // CHECK-NOT: !DICompositeType(tag: DW_TAG_structure_type, name: "data"
>
> Modified: cfe/trunk/test/CodeGenCXX/debug-info-indirect-field-decl.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-indirect-field-decl.cpp?rev=274633&r1=274632&r2=274633&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/CodeGenCXX/debug-info-indirect-field-decl.cpp (original)
> +++ cfe/trunk/test/CodeGenCXX/debug-info-indirect-field-decl.cpp Wed Jul
> 6 10:15:38 2016
> @@ -8,18 +8,18 @@ template <class T, int T::*ptr> class Fo
>  struct Bar {
>    int i1;
>    // CHECK: ![[INT:[0-9]+]] = !DIBasicType(name: "int"
> -  // CHECK: ![[UNION:[0-9]+]] = distinct !DICompositeType(tag:
> DW_TAG_union_type,{{.*}} identifier: "_ZTSN3BarUt_E")
> +  // CHECK: !DIDerivedType(tag: DW_TAG_member, scope:
> +  // CHECK-SAME:           line: [[@LINE+4]]
> +  // CHECK-SAME:           baseType: ![[UNION:[0-9]+]]
> +  // CHECK-SAME:           size: 32, align: 32, offset: 32
> +  // CHECK: ![[UNION]] = distinct !DICompositeType(tag:
> DW_TAG_union_type,{{.*}} identifier: "_ZTSN3BarUt_E")
>    union {
>      // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "i2",
> -    // CHECK-SAME:           line: [[@LINE+9]]
> +    // CHECK-SAME:           line: [[@LINE+5]]
>      // CHECK-SAME:           baseType: ![[INT]]
>      // CHECK-SAME:           size: 32, align: 32
>      // CHECK-NOT:            offset:
>      // CHECK-SAME:           ){{$}}
> -    // CHECK: !DIDerivedType(tag: DW_TAG_member, scope:
> -    // CHECK-SAME:           line: [[@LINE-8]]
> -    // CHECK-SAME:           baseType: ![[UNION]]
> -    // CHECK-SAME:           size: 32, align: 32, offset: 32
>      int i2;
>    };
>  };
>
> Modified: cfe/trunk/test/CodeGenCXX/debug-info-ms-abi.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-ms-abi.cpp?rev=274633&r1=274632&r2=274633&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/CodeGenCXX/debug-info-ms-abi.cpp (original)
> +++ cfe/trunk/test/CodeGenCXX/debug-info-ms-abi.cpp Wed Jul  6 10:15:38
> 2016
> @@ -14,9 +14,6 @@ Foo::Nested n;
>  // CHECK: ![[Foo:[^ ]*]] = distinct !DICompositeType(tag:
> DW_TAG_structure_type, name: "Foo",
>  // CHECK-SAME: identifier: ".?AUFoo@@"
>
> -// CHECK: distinct !DICompositeType(tag: DW_TAG_structure_type, name:
> "Nested",
> -// CHECK-SAME: identifier: ".?AUNested@Foo@@"
> -
>  // CHECK: !DISubprogram(name: "f",
>  // CHECK-SAME: containingType: ![[Foo]], virtuality:
> DW_VIRTUALITY_virtual, virtualIndex: 0,
>  // CHECK-SAME: flags: DIFlagPrototyped | DIFlagIntroducedVirtual,
> @@ -28,3 +25,6 @@ Foo::Nested n;
>  // CHECK: !DISubprogram(name: "h",
>  // CHECK-SAME: containingType: ![[Foo]], virtuality:
> DW_VIRTUALITY_virtual, virtualIndex: 2,
>  // CHECK-SAME: flags: DIFlagPrototyped | DIFlagIntroducedVirtual,
> +
> +// CHECK: distinct !DICompositeType(tag: DW_TAG_structure_type, name:
> "Nested",
> +// CHECK-SAME: identifier: ".?AUNested@Foo@@"
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to