[PATCH] D22034: [MSVC][DLL] use local vftable mangling only exported classes with virtual destructor

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 18 15:09:02 PDT 2016


rnk added a comment.

The approach makes sense to me, but the tests suggest it isn't doing what I'd expect.


================
Comment at: test/CodeGenCXX/dllimport-rtti.cpp:7
@@ -6,3 +6,1 @@
 } s;
-// MSVC: [[VF_S:.*]] = private unnamed_addr constant [2 x i8*]
-// MSVC-DAG: @"\01??_SS@@6B@" = unnamed_addr alias i8*, getelementptr inbounds ([2 x i8*], [2 x i8*]* [[VF_S]], i32 0, i32 1)
----------------
I would've expected this to remain the same, since the implicit default ctor of 'S' is constexpr by default in C++14. It seems a lot better to emit a local vftable here and get static initialization for 's' than dynamic initialization.


https://reviews.llvm.org/D22034





More information about the cfe-commits mailing list