amccarth 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; ---------------- rnk wrote: > 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. Comment added.
I don't think the EmitCodeView check is necessary because it seems unlikely the DLLImportAttr would be set with DWARF debug info, and, even if it is, I wouldn't expect it to do any harm. But I'll defer to dblaikie or other DWARF experts. https://reviews.llvm.org/D23462 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits