diff options
Diffstat (limited to 'src/passes/Heap2Local.cpp')
-rw-r--r-- | src/passes/Heap2Local.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/passes/Heap2Local.cpp b/src/passes/Heap2Local.cpp index f2846671c..796e0fa05 100644 --- a/src/passes/Heap2Local.cpp +++ b/src/passes/Heap2Local.cpp @@ -402,7 +402,9 @@ struct Heap2LocalOptimizer { } // Drop the RTT (as it may have side effects; leave it to other passes). - contents.push_back(builder.makeDrop(allocation->rtt)); + if (allocation->rtt) { + contents.push_back(builder.makeDrop(allocation->rtt)); + } // Replace the allocation with a null reference. This changes the type // from non-nullable to nullable, but as we optimize away the code that // the allocation reaches, we will handle that. |