File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -193,9 +193,9 @@ struct TranslateEHOldToNew
193193 }
194194 };
195195
196- std::unique_ptr <LabelUtils::LabelManager> labels;
197- std::unique_ptr <TargetTryLabelScanner> labelScanner;
198- std::unique_ptr <ExnrefLocalAssigner> localAssigner;
196+ std::optional <LabelUtils::LabelManager> labels;
197+ std::optional <TargetTryLabelScanner> labelScanner;
198+ std::optional <ExnrefLocalAssigner> localAssigner;
199199
200200 std::unordered_map<Name, Name> delegateTargetToBrTarget;
201201 // Scratch locals used to contain extracted values and (extracted values,
@@ -787,10 +787,10 @@ struct TranslateEHOldToNew
787787 }
788788
789789 void doWalkFunction (Function* func) {
790- labels = std::make_unique <LabelUtils::LabelManager>(func);
791- labelScanner = std::make_unique <TargetTryLabelScanner>(func);
790+ labels = std::make_optional <LabelUtils::LabelManager>(func);
791+ labelScanner = std::make_optional <TargetTryLabelScanner>(func);
792792 localAssigner =
793- std::make_unique <ExnrefLocalAssigner>(func, labelScanner.get ());
793+ std::make_optional <ExnrefLocalAssigner>(func, & labelScanner.value ());
794794
795795 // Create a unique br target label for each existing delegate target label,
796796 // because we are going to achieve 'delegate's effects with 'br's. See
You can’t perform that action at this time.
0 commit comments