r189214 - Fix virtual destructor mangling when using "-cxx-abi microsoft" on x64
Timur Iskhodzhanov
timurrrr at google.com
Mon Aug 26 03:38:47 PDT 2013
Reid, John,
FYI
I've committed this patch without sending it out for review first
as I think it's trivial enough and I'm pretty familiar with this particular
part of the codebase.
Hope you're OK with it.
--
Timur
2013/8/26 Timur Iskhodzhanov <timurrrr at google.com>
> Author: timurrrr
> Date: Mon Aug 26 05:32:04 2013
> New Revision: 189214
>
> URL: http://llvm.org/viewvc/llvm-project?rev=189214&view=rev
> Log:
> Fix virtual destructor mangling when using "-cxx-abi microsoft" on x64
>
> Modified:
> cfe/trunk/lib/AST/MicrosoftMangle.cpp
> cfe/trunk/test/CodeGenCXX/microsoft-abi-structors.cpp
>
> Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/MicrosoftMangle.cpp?rev=189214&r1=189213&r2=189214&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/AST/MicrosoftMangle.cpp (original)
> +++ cfe/trunk/lib/AST/MicrosoftMangle.cpp Mon Aug 26 05:32:04 2013
> @@ -1294,7 +1294,7 @@ void MicrosoftCXXNameMangler::mangleFunc
> // However, the FunctionType generated has 0 arguments.
> // FIXME: This is a temporary hack.
> // Maybe should fix the FunctionType creation instead?
> - Out << "PAXI at Z";
> + Out << (PointersAre64Bit ? "PEAXI at Z" : "PAXI at Z");
> return;
> }
> Out << '@';
>
> Modified: cfe/trunk/test/CodeGenCXX/microsoft-abi-structors.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/microsoft-abi-structors.cpp?rev=189214&r1=189213&r2=189214&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/CodeGenCXX/microsoft-abi-structors.cpp (original)
> +++ cfe/trunk/test/CodeGenCXX/microsoft-abi-structors.cpp Mon Aug 26
> 05:32:04 2013
> @@ -3,6 +3,8 @@
> // vftables are emitted very late, so do another pass to try to keep the
> checks
> // in source order.
> // RUN: FileCheck --check-prefix DTORS %s < %t
> +//
> +// RUN: %clang_cc1 -emit-llvm %s -o - -cxx-abi microsoft
> -triple=x86_64-pc-win32 -fno-rtti | FileCheck --check-prefix DTORS-X64 %s
>
> namespace basic {
>
> @@ -57,6 +59,9 @@ struct C {
> //
> // DTORS: [[CONTINUE_LABEL]]
> // DTORS-NEXT: ret void
> +
> +// Check that we do the mangling correctly on x64.
> +// DTORS-X64: @"\01??_GC at basic@@UEAAPEAXI at Z"
> }
> virtual void foo();
> };
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130826/3ae5f78c/attachment.html>
More information about the cfe-commits
mailing list