Fix NetBSD build: Define virtual destructors when needed
authorKamil Rytarowski <n54@gmx.com>
Sat, 6 Feb 2016 02:16:55 +0000 (03:16 +0100)
committerKamil Rytarowski <n54@gmx.com>
Sat, 6 Feb 2016 02:34:41 +0000 (03:34 +0100)
commitf18f4cc6dbee29990c4b4f89188548090a93341e
tree6aa3f18c9f782ed4286e4427d5497050fbb1900f
parent38e79000695cc59165ae67069902b4e9689f5f20
Fix NetBSD build: Define virtual destructors when needed

This fixes the following error with recent Clang (3.9.0nb20160205):

In file included from /tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/src/synchmgr/synchcontrollers.cpp:20:
In file included from /tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/src/synchmgr/synchmanager.hpp:24:
/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/src/include/pal/synchcache.hpp:146:13: error: destructor called on non-final 'CorUnix::CSynchWaitController' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor]
            pobj->~T();
            ^
/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/src/synchmgr/synchmanager.hpp:724:31: note: in instantiation of member function 'CorUnix::CSynchCache<CorUnix::CSynchWaitController>::Add' requested here
            m_cacheWaitCtrlrs.Add(pthrCurrent, pCtrlr);
                              ^
/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/src/include/pal/synchcache.hpp:146:20: note: qualify call to silence this warning
            pobj->~T();
                   ^
                   CorUnix::CSynchWaitController::
/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/src/include/pal/synchcache.hpp:146:13: error: destructor called on non-final 'CorUnix::CSynchStateController' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor]
            pobj->~T();
            ^
/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/src/synchmgr/synchmanager.hpp:741:32: note: in instantiation of member function 'CorUnix::CSynchCache<CorUnix::CSynchStateController>::Add' requested here
            m_cacheStateCtrlrs.Add(pthrCurrent, pCtrlr);
                               ^
/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/src/include/pal/synchcache.hpp:146:20: note: qualify call to silence this warning
            pobj->~T();
                   ^
                   CorUnix::CSynchStateController::
2 errors generated.
src/pal/src/synchmgr/synchmanager.hpp