[PATCH] D22034: [MSVC][DLL] use local vftable mangling only exported classes with virtual destructor
Dmitry Polukhin via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 14 04:13:10 PDT 2016
DmitryPolukhin added a comment.
In http://reviews.llvm.org/D22034#482925, @majnemer wrote:
> A flag on CXXRecordDecl which is sensitive to the most recent expression evaluation might not be the best way to go.
> Perhaps we should be able to use the VFTableBuilder to build imported and local vftables for the same vftable? Not entirely sure though...
The flag can be only set to true, there is no way to reset it false. So by the end of translation unit it should have proper value and many things are deferred until the end of translation unit (like CodeGenModule::EmitDeferredVTables). But your example shows that normal var generation is not deferred, I missed it. Deferring var generation in CodeGenModule::MayBeEmittedEagerly seems to work fine.
More information about the cfe-commits