nickdesaulniers added inline comments.

================
Comment at: clang/lib/CodeGen/CGDecl.cpp:103-118
+  case Decl::CXXRecord: // struct/union/class X; [C++]
+    if (CGDebugInfo *DI = getDebugInfo())
+      if (CGM.getCodeGenOpts().hasMaybeUnusedDebugInfo() &&
+          cast<CXXRecordDecl>(D).hasDefinition())
+        DI->completeUnusedClass(cast<CXXRecordDecl>(D));
+    return;
   case Decl::Record:    // struct/union/class X;
----------------
nickdesaulniers wrote:
> dblaikie wrote:
> > All of these might be able to be collapsed together - using 
> > "cast<TagDecl>(D).hasDefinition()" ... to have a common implementation.
> `TagDecl` doesn't have a method `hasDefinition`.  Only `CXXRecordDecl` does.
Also, how to get the `QualType` differs between `Decl::Enum` an `Decl::Record`; 
`getEnumType` vs `getRecordType` respectively.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80242



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to