mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SIL] Let alloc_box return a single value.
And use project_box to get to the address value. SILGen now generates a project_box for each alloc_box. And IRGen re-uses the address value from the alloc_box if the operand of project_box is an alloc_box. This lets the generated code be the same as before. Other than that most changes of this (quite large) commit are straightforward.
This commit is contained in:
@@ -215,8 +215,7 @@ protected:
|
||||
}
|
||||
|
||||
// An alloc_box returns its address as the second value.
|
||||
assert((PI.Aggregate == V || PI.Aggregate == SILValue(V, 1)) &&
|
||||
"Expected unary element addr inst.");
|
||||
assert(PI.Aggregate && "Expected unary element addr inst.");
|
||||
|
||||
// Recursively check for users after stripping this component from the
|
||||
// access path.
|
||||
|
||||
Reference in New Issue
Block a user