[PATCH] D11850: Delay emitting members of dllexport classes until the class is fully parsed (PR23542)

Hans Wennborg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 18 07:03:10 PST 2018


hans added a comment.

In D11850#1334344 <https://reviews.llvm.org/D11850#1334344>, @aganea wrote:

> Cross-referencing PR40006 <https://bugs.llvm.org/show_bug.cgi?id=40006>. It seems to be a different manifestation of this same bug.
>
> @hans Could you possibly take a look at the bug above whenever you have time? Many thanks!


Sorry, I saw the bug but didn't have time to look at it yet. I will try to get to it tomorrow.



================
Comment at: lib/Sema/SemaDeclCXX.cpp:4700-4703
+      if (TSK == TSK_ExplicitInstantiationDeclaration)
+        // Don't go any further if this is just an explicit instantiation
+        // declaration.
+        continue;
----------------
rsmith wrote:
> Can we bail out of the function early in this case?
Yes. Done.


================
Comment at: lib/Sema/SemaDeclCXX.cpp:9514
+    SmallVector<CXXRecordDecl *, 4> WorkList =
+        std::move(DelayedDllExportClasses);
+    for (CXXRecordDecl *Class : WorkList)
----------------
I was trying to fancy and use C++11 here, but I think I really just want good-old std::swap, because IIUC, I'm not supposed to use a var after std::move'ing from it?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D11850





More information about the cfe-commits mailing list