mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge remote-tracking branch 'origin/main' into rebranch
This commit is contained in:
@@ -1342,6 +1342,12 @@ bool SILInstruction::mayRequirePackMetadata() const {
|
||||
if (isDeallocatingStack())
|
||||
return false;
|
||||
|
||||
// Terminators that exit the function must not result in pack metadata
|
||||
// materialization.
|
||||
auto *ti = dyn_cast<TermInst>(this);
|
||||
if (ti && ti->isFunctionExiting())
|
||||
return false;
|
||||
|
||||
// Check results and operands for packs. If a pack appears, lowering the
|
||||
// instruction might result in pack metadata emission.
|
||||
for (auto result : getResults()) {
|
||||
|
||||
Reference in New Issue
Block a user