[PATCH] D51340: Add /Zc:DllexportInlines option to clang-cl

Takuto Ikuta via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 1 02:53:47 PDT 2018


takuto.ikuta added inline comments.


================
Comment at: clang/lib/Sema/SemaDecl.cpp:12624
+      isa<CXXMethodDecl>(D)) {
+    CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(D);
+    CXXRecordDecl *Class = MD->getParent();
----------------
hans wrote:
> Hmm, now we're adding an AST walk over all inline methods which probably slows us down a bit. Not sure I have any better ideas though.
> 
> In any case, ActOnFinishInlineFunctionDef needs a comment explaining why it's doing this.
Added comment. I think typical code does not have static variables in inline function and this check is worth to be done for the performance improvement.


https://reviews.llvm.org/D51340





More information about the cfe-commits mailing list