Skip to content

Commit 7e5b1dc

Browse files
author
git apple-llvm automerger
committed
Merge commit '478458574742' from llvm.org/main into next
2 parents 35eb65c + 4784585 commit 7e5b1dc

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

clang/lib/AST/ByteCode/InterpState.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ bool InterpState::reportOverflow(const Expr *E, const llvm::APSInt &Value) {
7676

7777
void InterpState::deallocate(Block *B) {
7878
assert(B);
79-
const Descriptor *Desc = B->getDescriptor();
80-
assert(Desc);
81-
8279
// The block might have a pointer saved in a field in its data
8380
// that points to the block itself. We call the dtor first,
8481
// which will destroy all the data but leave InlineDescriptors
@@ -95,7 +92,7 @@ void InterpState::deallocate(Block *B) {
9592
auto *D = new (Memory) DeadBlock(DeadBlocks, B);
9693
// Since the block doesn't hold any actual data anymore, we can just
9794
// memcpy() everything over.
98-
std::memcpy(D->rawData(), B->rawData(), Desc->getAllocSize());
95+
std::memcpy(D->rawData(), B->rawData(), B->getSize());
9996
D->B.IsInitialized = B->IsInitialized;
10097

10198
// We moved the contents over to the DeadBlock.

0 commit comments

Comments
 (0)