[PATCH] D42641: [MinGW] Emit typeinfo locally for dllimported classes without key functions

David Majnemer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 29 08:53:47 PST 2018


majnemer added inline comments.


================
Comment at: lib/CodeGen/CGVTables.cpp:887-888
 
+  if (CGM.getTriple().isWindowsGNUEnvironment() && RD->hasAttr<DLLImportAttr>())
+    return true;
+
----------------
Maybe a comment like "VTables of classes declared as dllimport are always considered to be external." ?


================
Comment at: lib/CodeGen/CGVTables.cpp:896-900
   // Otherwise, if the class is an instantiated template, the
   // vtable must be defined here.
   if (TSK == TSK_ImplicitInstantiation ||
       TSK == TSK_ExplicitInstantiationDefinition)
     return false;
----------------
It would be good to have tests for what would have happened if these paths got hit.


https://reviews.llvm.org/D42641





More information about the cfe-commits mailing list