Skip to content

Commit 66efdf7

Browse files
Merge pull request #11139 from adrian-prantl/remove-copy-constructor
[lldb] Delete copy constructor to avoid accidentally holding a lock (…
2 parents cf66110 + 5cafdf6 commit 66efdf7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lldb/source/Plugins/LanguageRuntime/Swift/LockGuarded.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ template <typename Resource> struct LockGuarded {
2323
: m_resource(resource), m_lock(mutex, std::adopt_lock) {}
2424

2525
LockGuarded() = default;
26+
LockGuarded(const LockGuarded &) = delete;
27+
LockGuarded &operator=(const LockGuarded &) = delete;
2628

2729
Resource *operator->() const { return m_resource; }
2830

0 commit comments

Comments
 (0)