Skip to content

Commit e2698ed

Browse files
committed
[MemAccessUtils] Non-trivial Cxx node is leaf.
Nodes which are non-trivial C++ decls must be destroyed, they cannot be destroyed by way of destroying their subobjects. This was exposed by producing more non-lexical alloc_stacks which enjoy more aggressive destroy_addr hoisting.
1 parent 921c7f6 commit e2698ed

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/SIL/Utils/MemAccessUtils.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -1415,6 +1415,10 @@ void swift::visitProductLeafAccessPathNodes(
14151415
visitor(AccessPath::PathNode(node), silType);
14161416
continue;
14171417
}
1418+
if (decl->isCxxNonTrivial()) {
1419+
visitor(AccessPath::PathNode(node), silType);
1420+
continue;
1421+
}
14181422
unsigned index = 0;
14191423
for (auto *field : decl->getStoredProperties()) {
14201424
auto *fieldNode = node->getChild(index);

0 commit comments

Comments
 (0)