Skip to content

Commit 2c3f27d

Browse files
Merge pull request #11162 from adrian-prantl/cherry-pick-next-lldb-Delete-copy-constructor-to-avoid-accidentally-holding-a-lock-NFC
[Cherry-pick into next] [lldb] Delete copy constructor to avoid accidentally holding a lock (NFC)
2 parents ac579f5 + 9a8ca0c commit 2c3f27d

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)