File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -6585,6 +6585,8 @@ static Function *createOutlinedFunction(
6585
6585
ParameterTypes.push_back (Arg->getType ());
6586
6586
}
6587
6587
6588
+ // Save insert point.
6589
+ IRBuilder<>::InsertPointGuard IPG (Builder);
6588
6590
auto BB = Builder.GetInsertBlock ();
6589
6591
auto M = BB->getModule ();
6590
6592
auto FuncType = FunctionType::get (Builder.getVoidTy (), ParameterTypes,
@@ -6621,9 +6623,6 @@ static Function *createOutlinedFunction(
6621
6623
}
6622
6624
}
6623
6625
6624
- // Save insert point.
6625
- auto OldInsertPoint = Builder.saveIP ();
6626
-
6627
6626
// Generate the region into the function.
6628
6627
BasicBlock *EntryBB = BasicBlock::Create (Builder.getContext (), " entry" , Func);
6629
6628
Builder.SetInsertPoint (EntryBB);
@@ -6729,9 +6728,6 @@ static Function *createOutlinedFunction(
6729
6728
for (auto Deferred : DeferredReplacement)
6730
6729
ReplaceValue (std::get<0 >(Deferred), std::get<1 >(Deferred), Func);
6731
6730
6732
- // Restore insert point.
6733
- Builder.restoreIP (OldInsertPoint);
6734
-
6735
6731
return Func;
6736
6732
}
6737
6733
You can’t perform that action at this time.
0 commit comments