Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/IRGen/GenExistential.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,11 @@ namespace {
const size_t count = pThis->NumStoredProtocols;
const size_t size =
Tail::template totalSizeToAlloc<const ProtocolDecl *>(count);
#if defined(__cpp_sized_deallocation) && __cpp_sized_deallocation >= 201309L
::operator delete(ptr, size);
#else
::operator delete(ptr);
#endif
}

/// Returns the number of protocol witness tables directly carried
Expand Down
4 changes: 4 additions & 0 deletions lib/IRGen/GenRecord.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ class RecordTypeInfoImpl : public Base,
const auto *pThis = static_cast<RecordTypeInfoImpl *>(ptr);
const size_t count = pThis->NumFields;
const size_t size = Impl::template totalSizeToAlloc<FieldImpl>(count);
#if defined(__cpp_sized_deallocation) && __cpp_sized_deallocation >= 201309L
::operator delete(ptr, size);
#else
::operator delete(ptr);
#endif
}

bool areFieldsABIAccessible() const {
Expand Down
4 changes: 4 additions & 0 deletions lib/IRGen/ProtocolInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,11 @@ class ProtocolInfo final :
const auto *pThis = static_cast<ProtocolInfo *>(ptr);
const size_t count = pThis->NumTableEntries;
const size_t size = totalSizeToAlloc<WitnessTableEntry>(count);
#if defined(__cpp_sized_deallocation) && __cpp_sized_deallocation >= 201309L
::operator delete(ptr, size);
#else
::operator delete(ptr);
#endif
}

/// The number of witness slots in a conformance to this protocol;
Expand Down