diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2014-10-31 20:09:12 +0000 |
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2014-10-31 20:09:12 +0000 |
| commit | 0c0b6d9ac6b37724807f1cf0c0c05b1bba3c3b48 (patch) | |
| tree | 5acc8db1d3c1a830e9df04a21ad87aa231c8ac84 /clang/test/CodeGenCXX/dllexport.cpp | |
| parent | 6e21338abb6e4017a30323943daf074917601dd1 (diff) | |
| download | bcm5719-llvm-0c0b6d9ac6b37724807f1cf0c0c05b1bba3c3b48.tar.gz bcm5719-llvm-0c0b6d9ac6b37724807f1cf0c0c05b1bba3c3b48.zip | |
MS ABI: Properly call global delete when invoking virtual destructors
Summary:
The Itanium ABI approach of using offset-to-top isn't possible with the
MS ABI, it doesn't have that kind of information lying around.
Instead, we do the following:
- Call the virtual deleting destructor with the "don't delete the object
flag" set. The virtual deleting destructor will return a pointer to
'this' adjusted to the most derived class.
- Call the global delete using the adjusted 'this' pointer.
Reviewers: rnk
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D5996
llvm-svn: 220993
Diffstat (limited to 'clang/test/CodeGenCXX/dllexport.cpp')
| -rw-r--r-- | clang/test/CodeGenCXX/dllexport.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/dllexport.cpp b/clang/test/CodeGenCXX/dllexport.cpp index 0e6e989846c..5eb2dbfa7f7 100644 --- a/clang/test/CodeGenCXX/dllexport.cpp +++ b/clang/test/CodeGenCXX/dllexport.cpp @@ -534,7 +534,7 @@ struct __declspec(dllexport) Y { struct __declspec(dllexport) Z { virtual ~Z() {} }; // The scalar deleting dtor does not get exported: -// M32-DAG: define linkonce_odr x86_thiscallcc void @"\01??_GZ@@UAEPAXI@Z" +// M32-DAG: define linkonce_odr x86_thiscallcc i8* @"\01??_GZ@@UAEPAXI@Z" // The user-defined dtor does get exported: |

