@@ -671,7 +671,7 @@ class SILBuilder {
671671 return createLoad (Loc, LV, LoadOwnershipQualifier::Unqualified);
672672 }
673673
674- if (LV->getType ().isTrivial (getModule ())) {
674+ if (LV->getType ().isTrivial (getFunction ())) {
675675 return createLoad (Loc, LV, LoadOwnershipQualifier::Trivial);
676676 }
677677 return createLoad (Loc, LV, Qualifier);
@@ -764,7 +764,7 @@ class SILBuilder {
764764 return createStore (Loc, Src, DestAddr,
765765 StoreOwnershipQualifier::Unqualified);
766766 }
767- if (Src->getType ().isTrivial (getModule ())) {
767+ if (Src->getType ().isTrivial (getFunction ())) {
768768 return createStore (Loc, Src, DestAddr, StoreOwnershipQualifier::Trivial);
769769 }
770770 return createStore (Loc, Src, DestAddr, Qualifier);
@@ -1095,7 +1095,7 @@ class SILBuilder {
10951095 }
10961096
10971097 CopyValueInst *createCopyValue (SILLocation Loc, SILValue operand) {
1098- assert (!operand->getType ().isTrivial (getModule ()) &&
1098+ assert (!operand->getType ().isTrivial (getFunction ()) &&
10991099 " Should not be passing trivial values to this api. Use instead "
11001100 " emitCopyValueOperation" );
11011101 return insert (new (getModule ())
@@ -1104,7 +1104,7 @@ class SILBuilder {
11041104
11051105 DestroyValueInst *createDestroyValue (SILLocation Loc, SILValue operand) {
11061106 assert (isLoadableOrOpaque (operand->getType ()));
1107- assert (!operand->getType ().isTrivial (getModule ()) &&
1107+ assert (!operand->getType ().isTrivial (getFunction ()) &&
11081108 " Should not be passing trivial values to this api. Use instead "
11091109 " emitDestroyValueOperation" );
11101110 return insert (new (getModule ())
@@ -1398,13 +1398,13 @@ class SILBuilder {
13981398 DestructureStructInst *createDestructureStruct (SILLocation Loc,
13991399 SILValue Operand) {
14001400 return insert (DestructureStructInst::create (
1401- getModule (), getSILDebugLocation (Loc), Operand));
1401+ getFunction (), getSILDebugLocation (Loc), Operand));
14021402 }
14031403
14041404 DestructureTupleInst *createDestructureTuple (SILLocation Loc,
14051405 SILValue Operand) {
14061406 return insert (DestructureTupleInst::create (
1407- getModule (), getSILDebugLocation (Loc), Operand));
1407+ getFunction (), getSILDebugLocation (Loc), Operand));
14081408 }
14091409
14101410 MultipleValueInstruction *emitDestructureValueOperation (SILLocation loc,
0 commit comments