Skip to content

Commit 5cafdf6

Browse files
committed
[lldb] Delete copy constructor to avoid accidentally holding a lock (NFC)
1 parent 027f02d commit 5cafdf6

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)