@@ -397,8 +397,8 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
397
397
398
398
PassMode :: Cast ( cast_ty, _) => {
399
399
let op = match self . locals [ mir:: RETURN_PLACE ] {
400
- LocalRef :: Operand ( Some ( op ) ) => op,
401
- LocalRef :: Operand ( None ) => bug ! ( "use of return before def" ) ,
400
+ LocalRef :: Operand ( op ) => op,
401
+ LocalRef :: PendingOperand => bug ! ( "use of return before def" ) ,
402
402
LocalRef :: Place ( cg_place) => OperandRef {
403
403
val : Ref ( cg_place. llval , None , cg_place. align ) ,
404
404
layout : cg_place. layout ,
@@ -1673,7 +1673,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
1673
1673
match self . locals [ index] {
1674
1674
LocalRef :: Place ( dest) => dest,
1675
1675
LocalRef :: UnsizedPlace ( _) => bug ! ( "return type must be sized" ) ,
1676
- LocalRef :: Operand ( None ) => {
1676
+ LocalRef :: PendingOperand => {
1677
1677
// Handle temporary places, specifically `Operand` ones, as
1678
1678
// they don't have `alloca`s.
1679
1679
return if fn_ret. is_indirect ( ) {
@@ -1694,7 +1694,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
1694
1694
ReturnDest :: DirectOperand ( index)
1695
1695
} ;
1696
1696
}
1697
- LocalRef :: Operand ( Some ( _ ) ) => {
1697
+ LocalRef :: Operand ( _ ) => {
1698
1698
bug ! ( "place local already assigned to" ) ;
1699
1699
}
1700
1700
}
@@ -1737,7 +1737,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
1737
1737
IndirectOperand ( tmp, index) => {
1738
1738
let op = bx. load_operand ( tmp) ;
1739
1739
tmp. storage_dead ( bx) ;
1740
- self . locals [ index] = LocalRef :: Operand ( Some ( op ) ) ;
1740
+ self . locals [ index] = LocalRef :: Operand ( op ) ;
1741
1741
self . debug_introduce_local ( bx, index) ;
1742
1742
}
1743
1743
DirectOperand ( index) => {
@@ -1752,7 +1752,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
1752
1752
} else {
1753
1753
OperandRef :: from_immediate_or_packed_pair ( bx, llval, ret_abi. layout )
1754
1754
} ;
1755
- self . locals [ index] = LocalRef :: Operand ( Some ( op ) ) ;
1755
+ self . locals [ index] = LocalRef :: Operand ( op ) ;
1756
1756
self . debug_introduce_local ( bx, index) ;
1757
1757
}
1758
1758
}
0 commit comments