[PATCH] D23462: Emit debug info for dynamic classes if they are imported from a DLL

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 16 08:20:42 PDT 2016


rnk added inline comments.

================
Comment at: lib/CodeGen/CGDebugInfo.cpp:1688-1689
@@ -1687,3 +1687,4 @@
 
-  if (CXXDecl->hasDefinition() && CXXDecl->isDynamicClass())
+  if (CXXDecl->hasDefinition() && CXXDecl->isDynamicClass() &&
+      !CXXDecl->hasAttr<DLLImportAttr>())
     return true;
----------------
David, since we're doing this check to work around a limitation of PDB-based debuggers, do you think we should guard check with EmitCodeView, so that we don't emit the full type if we're emitting DWARF?

After that, I'd add a comment like:
  // Only emit complete debug info for a dynamic class when its vtable is emitted. However,
  // Microsoft debuggers are unable to resolve type information across DLL boundaries,
  // so skip this optimization if the class is marked dllimport.


https://reviews.llvm.org/D23462





More information about the cfe-commits mailing list