Skip to content

Commit 84b69f0

Browse files
committed
[GenericCloner] Propagate @_optimize(none) when cloning
1 parent 159a78a commit 84b69f0

File tree

4 files changed

+764
-0
lines changed

4 files changed

+764
-0
lines changed

lib/SILOptimizer/Utils/GenericCloner.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ SILFunction *GenericCloner::createDeclaration(
5151
for (auto &Attr : Orig->getSemanticsAttrs()) {
5252
NewF->addSemanticsAttr(Attr);
5353
}
54+
NewF->setOptimizationMode(Orig->getOptimizationMode());
5455
if (!Orig->hasOwnership()) {
5556
NewF->setOwnershipEliminated();
5657
}

0 commit comments

Comments
 (0)