@@ -2094,12 +2094,12 @@ class AllocStackInst final
20942094 AllocStackInst (SILDebugLocation Loc, SILType elementType,
20952095 ArrayRef<SILValue> TypeDependentOperands, SILFunction &F,
20962096 Optional<SILDebugVariable> Var, bool hasDynamicLifetime,
2097- bool isLexical, bool wasMoved );
2097+ bool isLexical, bool usesMoveableValueDebugInfo );
20982098
20992099 static AllocStackInst *create (SILDebugLocation Loc, SILType elementType,
21002100 SILFunction &F, Optional<SILDebugVariable> Var,
21012101 bool hasDynamicLifetime, bool isLexical,
2102- bool wasMoved );
2102+ bool usesMoveableValueDebugInfo );
21032103
21042104 SIL_DEBUG_VAR_SUPPLEMENT_TRAILING_OBJS_IMPL ()
21052105
@@ -2116,11 +2116,15 @@ class AllocStackInst final
21162116 }
21172117 }
21182118
2119- void markAsMoved () { sharedUInt8 ().AllocStackInst .wasMoved = true ; }
2119+ void markUsesMoveableValueDebugInfo () {
2120+ sharedUInt8 ().AllocStackInst .usesMoveableValueDebugInfo = true ;
2121+ }
21202122
21212123 // / Set to true if this alloc_stack's memory location was passed to _move at
21222124 // / any point of the program.
2123- bool getWasMoved () const { return sharedUInt8 ().AllocStackInst .wasMoved ; }
2125+ bool getUsesMoveableValueDebugInfo () const {
2126+ return sharedUInt8 ().AllocStackInst .usesMoveableValueDebugInfo ;
2127+ }
21242128
21252129 // / Set to true that this alloc_stack contains a value whose lifetime can not
21262130 // / be ascertained from uses.
@@ -2452,39 +2456,53 @@ class AllocBoxInst final
24522456
24532457 TailAllocatedDebugVariable VarInfo;
24542458
2455- unsigned HasDynamicLifetime : 1 ;
2456- unsigned Reflection : 1 ;
2459+ USE_SHARED_UINT8;
24572460
24582461 AllocBoxInst (SILDebugLocation DebugLoc, CanSILBoxType BoxType,
24592462 ArrayRef<SILValue> TypeDependentOperands, SILFunction &F,
24602463 Optional<SILDebugVariable> Var, bool hasDynamicLifetime,
2461- bool reflection = false );
2464+ bool reflection = false ,
2465+ bool usesMoveableValueDebugInfo = false );
24622466
24632467 static AllocBoxInst *create (SILDebugLocation Loc, CanSILBoxType boxType,
2464- SILFunction &F,
2465- Optional<SILDebugVariable> Var,
2466- bool hasDynamicLifetime,
2467- bool reflection = false );
2468+ SILFunction &F, Optional<SILDebugVariable> Var,
2469+ bool hasDynamicLifetime, bool reflection = false ,
2470+ bool usesMoveableValueDebugInfo = false );
24682471
24692472public:
24702473 CanSILBoxType getBoxType () const {
24712474 return getType ().castTo <SILBoxType>();
24722475 }
24732476
2474- void setDynamicLifetime () { HasDynamicLifetime = true ; }
2475- bool hasDynamicLifetime () const { return HasDynamicLifetime; }
2477+ void setDynamicLifetime () {
2478+ sharedUInt8 ().AllocBoxInst .dynamicLifetime = true ;
2479+ }
2480+
2481+ bool hasDynamicLifetime () const {
2482+ return sharedUInt8 ().AllocBoxInst .dynamicLifetime ;
2483+ }
24762484
24772485 // / True if the box should be emitted with reflection metadata for its
24782486 // / contents.
2479- bool emitReflectionMetadata () const { return Reflection; }
2480-
2487+ bool emitReflectionMetadata () const {
2488+ return sharedUInt8 ().AllocBoxInst .reflection ;
2489+ }
2490+
24812491 // Return the type of the memory stored in the alloc_box.
24822492 SILType getAddressType () const ;
24832493
24842494 // / Return the debug variable information attached to this instruction.
24852495 Optional<SILDebugVariable> getVarInfo () const {
24862496 return VarInfo.get (getDecl (), getTrailingObjects<char >());
24872497 };
2498+
2499+ void setUsesMoveableValueDebugInfo () {
2500+ sharedUInt8 ().AllocBoxInst .usesMoveableValueDebugInfo = true ;
2501+ }
2502+
2503+ bool getUsesMoveableValueDebugInfo () const {
2504+ return sharedUInt8 ().AllocBoxInst .usesMoveableValueDebugInfo ;
2505+ }
24882506};
24892507
24902508// / This represents the allocation of a heap box for an existential container.
@@ -5012,14 +5030,17 @@ class DebugValueInst final
50125030 size_t numTrailingObjects (OverloadToken<char >) const { return 1 ; }
50135031
50145032public:
5015- void markAsMoved () { sharedUInt8 ().DebugValueInst .operandWasMoved = true ; }
5033+ // / Sets a bool that states this debug_value is supposed to use the
5034+ void setUsesMoveableValueDebugInfo () {
5035+ sharedUInt8 ().DebugValueInst .usesMoveableValueDebugInfo = true ;
5036+ }
50165037
50175038 // / True if this debug_value is on an SSA value that was moved.
50185039 // /
50195040 // / IRGen uses this information to determine if we should use llvm.dbg.addr or
50205041 // / llvm.dbg.declare.
5021- bool getWasMoved () const {
5022- return sharedUInt8 ().DebugValueInst .operandWasMoved ;
5042+ bool getUsesMoveableValueDebugInfo () const {
5043+ return sharedUInt8 ().DebugValueInst .usesMoveableValueDebugInfo ;
50235044 }
50245045
50255046 // / Return the underlying variable declaration that this denotes,
0 commit comments