aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCCodeView.cpp
diff options
context:
space:
mode:
authorNathan James <n.james93@hotmail.co.uk>2020-12-07 20:20:08 +0000
committerNathan James <n.james93@hotmail.co.uk>2020-12-07 20:20:08 +0000
commitdc361d5c2a2dd34839ff4cd48844cf1bf9a87c62 (patch)
tree050839aeb737e9434dea3e67238ac508a08ad623 /llvm/lib/MC/MCCodeView.cpp
parent0a391060f16dc3e10bcb0b02036073021c414006 (diff)
downloadllvm-dc361d5c2a2dd34839ff4cd48844cf1bf9a87c62.zip
llvm-dc361d5c2a2dd34839ff4cd48844cf1bf9a87c62.tar.gz
llvm-dc361d5c2a2dd34839ff4cd48844cf1bf9a87c62.tar.bz2
[llvm] Add asserts in (ThreadSafe)?RefCountedBase destructors
Added a trivial destructor in release mode and in debug mode a destructor that asserts RefCount is indeed zero. This ensure people aren't manually (maybe accidentally) destroying these objects like in this contrived example. ```lang=c++ { std::unique_ptr<SomethingRefCounted> Object; holdIntrusiveOwnership(Object.get()); // Object Destructor called here will assert. } ``` Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D92480
Diffstat (limited to 'llvm/lib/MC/MCCodeView.cpp')
0 files changed, 0 insertions, 0 deletions