[PATCH] [-cxx-abi microsoft] Mangle local TagDecls appropriately
David Majnemer
david.majnemer at gmail.com
Sat Aug 31 20:11:41 PDT 2013
Richard, great catch! I've added code and a test to address it.
================
Comment at: test/CodeGenCXX/mangle-ms.cpp:252
@@ +251,3 @@
+ int a_field;
+ } static_variable_in_inline_function = { 20 };
+ // CHECK: @"\01?static_variable_in_inline_function@?1??inline_function_with_local_type@@YAHXZ at 4U<unnamed-type-static_variable_in_inline_function>@?1??1 at YAHXZ@A"
----------------
Reid Kleckner wrote:
> You can improve on this with:
> inline int inline_function_with_local_type() {
> static struct {
> int a_field;
> } static_variable_in_inline_function = { 20 }, second_static = { 40 };
> return static_variable_in_inline_function.a_field + second_static.a_field;
> }
>
> I verified that cl.exe uses the first variable name in the type.
Addressed in my last commit.
http://llvm-reviews.chandlerc.com/D1540
More information about the cfe-commits
mailing list