projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0173eb0
)
IntrusiveRefCntPtr: Ensure RefCount is initialized during ThreadSafeRefCountedBase...
author
David Blaikie
<dblaikie@gmail.com>
Fri, 4 Dec 2020 02:23:13 +0000
(18:23 -0800)
committer
David Blaikie
<dblaikie@gmail.com>
Fri, 4 Dec 2020 02:43:01 +0000
(18:43 -0800)
Post commit feedback on
2e83ccc2ee33
from Nathan James!
llvm/include/llvm/ADT/IntrusiveRefCntPtr.h
patch
|
blob
|
history
diff --git
a/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h
b/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h
index
42486d1
..
41e5e6b
100644
(file)
--- a/
llvm/include/llvm/ADT/IntrusiveRefCntPtr.h
+++ b/
llvm/include/llvm/ADT/IntrusiveRefCntPtr.h
@@
-86,10
+86,10
@@
public:
/// A thread-safe version of \c RefCountedBase.
template <class Derived> class ThreadSafeRefCountedBase {
- mutable std::atomic<int> RefCount;
+ mutable std::atomic<int> RefCount
{0}
;
protected:
- ThreadSafeRefCountedBase()
: RefCount(0) {}
+ ThreadSafeRefCountedBase()
= default;
ThreadSafeRefCountedBase(const ThreadSafeRefCountedBase &) {}
ThreadSafeRefCountedBase &
operator=(const ThreadSafeRefCountedBase &) = delete;