diff options
author | dtorilov <dtorilov@yandex-team.com> | 2023-04-07 19:28:38 +0300 |
---|---|---|
committer | dtorilov <dtorilov@yandex-team.com> | 2023-04-07 19:28:38 +0300 |
commit | 7ed09b46300d8f96017e90a08cb11c76f0da736e (patch) | |
tree | 32f4302293f9804c100454d04b4caa329a01e2e2 /library/cpp | |
parent | e3de97527b32f1a34cad4916af34e6acaa0cefa2 (diff) | |
download | ydb-7ed09b46300d8f96017e90a08cb11c76f0da736e.tar.gz |
YT-18707: Move LLVM out of ytlib
Diffstat (limited to 'library/cpp')
-rw-r--r-- | library/cpp/yt/memory/ref_counted.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/library/cpp/yt/memory/ref_counted.h b/library/cpp/yt/memory/ref_counted.h index d6f79edf8e3..6327141cd82 100644 --- a/library/cpp/yt/memory/ref_counted.h +++ b/library/cpp/yt/memory/ref_counted.h @@ -156,6 +156,22 @@ using TRefCountedPtr = TIntrusivePtr<TRefCounted>; ::NYT::TRefCountedHelper<type>::Deallocate(obj); \ } +//! Provides weak implementations for Ref/Unref overloads. +//! Do not use if unsure. +#define DEFINE_WEAK_REFCOUNTED_TYPE(type) \ + [[maybe_unused]] Y_WEAK YT_ATTRIBUTE_USED const ::NYT::TRefCounter* GetRefCounter(const type*) \ + { \ + YT_ABORT(); \ + } \ + [[maybe_unused]] Y_WEAK YT_ATTRIBUTE_USED void DestroyRefCounted(const type*) \ + { \ + YT_ABORT(); \ + } \ + [[maybe_unused]] Y_WEAK YT_ATTRIBUTE_USED void DeallocateRefCounted(const type*) \ + { \ + YT_ABORT(); \ + } + //////////////////////////////////////////////////////////////////////////////// } // namespace NYT |