We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c8d573 commit ed5b4cfCopy full SHA for ed5b4cf
lib/IRGen/LoadableByAddress.cpp
@@ -1883,7 +1883,14 @@ void LoadableStorageAllocation::replaceLoad(LoadInst *load) {
1883
1884
static void allocateAndSet(StructLoweringState &pass,
1885
LoadableStorageAllocation &allocator,
1886
- SILValue operand, SILInstruction *user) {
+ SILValue operand, SILInstruction *user,
1887
+ Operand &opd) {
1888
+ if (isa<SILUndef>(operand)) {
1889
+ auto alloc = allocate(pass, operand->getType());
1890
+ opd.set(alloc);
1891
+ return;
1892
+ }
1893
+
1894
auto inst = operand->getDefiningInstruction();
1895
if (!inst) {
1896
allocateAndSetForArgument(pass, cast<SILArgument>(operand), user);
0 commit comments