rnk added inline comments.

================
Comment at: lib/Sema/SemaDeclCXX.cpp:5754-5756
+  if (ClassExported &&
+      Context.getTargetInfo().getTriple().isWindowsGNUEnvironment())
+    MarkVTableUsed(Class->getLocation(), Class, true);
----------------
This may be too early, you can get into situations like this if you start 
emitting the vtable (which will emit inline methods) before we get to the end 
of the outermost class. See this bug for example:
https://bugs.llvm.org/show_bug.cgi?id=40006

Maybe if you have a dllexported nested class with a virtual method that 
references the constructor of the outer class which has a late-parsed member 
initializer... you can get things to go wrong as in the bug above.

I think the fix will be to touch the vtable when we process delayed dllexported 
classes from the list just above this line.


================
Comment at: test/CodeGenCXX/dllexport-missing-key.cpp:20
+
+// GNU-DAG: @_ZTV24QAbstractLayoutStyleInfo = weak_odr dso_local dllexport
+// GNU-DAG: @_ZTS24QAbstractLayoutStyleInfo = linkonce_odr
----------------
OK, good, I was going to ask if it became weak_odr, but looks like it all works.


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

https://reviews.llvm.org/D55698



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

Reply via email to