Skip to content

Commit

Permalink
disable cheerp attributes for global new/delete defs
Browse files Browse the repository at this point in the history
  • Loading branch information
yuri91 committed Oct 22, 2024
1 parent a893bad commit 6afa54a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libcxx/include/new
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ inline constexpr destroying_delete_t destroying_delete{};

#if !defined(_LIBCPP_ABI_VCRUNTIME)

#pragma cheerp env none
[[cheerp::default_new]]
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz) _THROW_BAD_ALLOC;
[[cheerp::default_new]]
Expand Down Expand Up @@ -275,6 +276,8 @@ _LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_INLINE_VISIBILITY void* operator ne
inline _LIBCPP_INLINE_VISIBILITY void operator delete (void*, void*) _NOEXCEPT {}
inline _LIBCPP_INLINE_VISIBILITY void operator delete[](void*, void*) _NOEXCEPT {}

#pragma cheerp env reset

#endif // !_LIBCPP_ABI_VCRUNTIME

_LIBCPP_BEGIN_NAMESPACE_STD
Expand Down

0 comments on commit 6afa54a

Please sign in to comment.