diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-01-29 12:20:32 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-29 12:20:32 -0600 |
commit | 6adb00247896c7c1102e14c8a87d6a1a2e9031f9 (patch) | |
tree | e74ace939b26d2acbabf01321070bddcaf99c96e /bindgen-integration/cpp/Test.cc | |
parent | 821b133702b7fd8e719ae62382aa9579f802867a (diff) | |
parent | 29705c24aa998436bcd013387a2798b519374c78 (diff) |
Auto merge of #1240 - emilio:virtual-dtor-fix, r=fitzgen
ir: Choose the right mangling for destructors on all codepaths.
Fixes #1133.
Diffstat (limited to 'bindgen-integration/cpp/Test.cc')
-rw-r--r-- | bindgen-integration/cpp/Test.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bindgen-integration/cpp/Test.cc b/bindgen-integration/cpp/Test.cc index 57c2186b..80ae0239 100644 --- a/bindgen-integration/cpp/Test.cc +++ b/bindgen-integration/cpp/Test.cc @@ -3,6 +3,18 @@ const int Test::COUNTDOWN[] = { 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; const int* Test::COUNTDOWN_PTR = Test::COUNTDOWN; +unsigned VirtualDestructor::sDestructorCount = 0; +VirtualDestructor::~VirtualDestructor() { + sDestructorCount++; +} + +unsigned InheritsFromVirtualDestructor::sDestructorCount = 0; +InheritsFromVirtualDestructor::InheritsFromVirtualDestructor() = default; + +InheritsFromVirtualDestructor::~InheritsFromVirtualDestructor() { + sDestructorCount++; +} + const int* Test::countdown() { return COUNTDOWN; } |