rnk added a comment.

MSVC appears to ignore __stdcall on virtual destructors, and I think the 
correct fix is for us to do the same.

See this test case:

  $ cat t.cpp
  struct A { virtual __stdcall ~A(); };
  A::~A() {}
  $ cl -c t.cpp
  Microsoft (R) C/C++ Optimizing Compiler Version 18.00.31101 for x86
  Copyright (C) Microsoft Corporation.  All rights reserved.
  
  t.cpp
  $ dumpbin /symbols t.obj | grep ~A
  00B 00000000 SECT3  notype ()    External     | ??1A@@UAE@XZ (public: virtual 
__thiscall A::~A(void))

Notice the "__thiscall" part of the symbol name. The assembly also shows that 
it pulls 'this' from ecx.


http://reviews.llvm.org/D12402



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to