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

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 31 23:35:17 PST 2018


mstorsjo added inline comments.


================
Comment at: lib/CodeGen/ItaniumCXXABI.cpp:2766
+    // Don't import the RTTI but emit it locally
+    if (CGM.getTriple().isWindowsGNUEnvironment() && IsDLLImport)
+      return false;
----------------
mstorsjo wrote:
> compnerd wrote:
> > Can't this be simplified to ignore the `IsDLLImport`?  If it is export, it should be emitted, if it is import, it should emit it locally.  If it is static, it should also emit it locally, no?
> Hmm, maybe - I tried to keep the condition as specific as possible for the one case that doesn't work right now. I think that might give more stray changes to tests though.
Doing that change requires changes in CodeGenCXX/vtable-key-function-ios.cpp, where a non-dllimport typeinfo previous was referred to externally but now would be imported. It's probably harmless but produces more typeinfo instances than what actually is required. (Building Qt with that change still succeeds.)


https://reviews.llvm.org/D42641





More information about the cfe-commits mailing list