@@ -316,27 +316,14 @@ class UnaryInstructionBase : public BASE {
316
316
typename std::enable_if<has_result<X>::value, SILType>::type
317
317
getType (unsigned i = 0 ) const { return ValueBase::getType (i); }
318
318
319
- ArrayRef<Operand> getAllOperands () const { return Operands.asArray (); }\
319
+ ArrayRef<Operand> getAllOperands () const { return Operands.asArray (); }
320
320
MutableArrayRef<Operand> getAllOperands () { return Operands.asArray (); }
321
321
322
322
static bool classof (const ValueBase *V) {
323
323
return V->getKind () == KIND;
324
324
}
325
325
};
326
326
327
-
328
- // / Holds common debug information about local variables and function
329
- // / arguments that are needed by DebugValueInst, DebugValueAddrInst,
330
- // / AllocStackInst, and AllocBoxInst.
331
- class DebugVariable {
332
- // / The source function argument position from left to right
333
- // / starting with 1 or 0 if this is a local variable.
334
- unsigned char ArgNo;
335
- public:
336
- DebugVariable (unsigned ArgNo) : ArgNo(ArgNo) {};
337
- unsigned getArgNo () const { return ArgNo; }
338
- };
339
-
340
327
// ===----------------------------------------------------------------------===//
341
328
// Allocation Instructions
342
329
// ===----------------------------------------------------------------------===//
@@ -381,20 +368,15 @@ class StackPromotable {
381
368
// / reference count) stack memory. The memory is provided uninitialized.
382
369
class AllocStackInst : public AllocationInst {
383
370
friend class SILBuilder ;
384
- DebugVariable VarInfo;
385
371
386
- AllocStackInst (SILDebugLocation *Loc, SILType elementType, SILFunction &F,
387
- unsigned ArgNo);
372
+ AllocStackInst (SILDebugLocation *Loc, SILType elementType, SILFunction &F);
388
373
389
374
public:
390
375
391
376
// / getDecl - Return the underlying variable declaration associated with this
392
377
// / allocation, or null if this is a temporary allocation.
393
378
VarDecl *getDecl () const ;
394
379
395
- DebugVariable getVarInfo () const { return VarInfo; };
396
- void setArgNo (unsigned N) { VarInfo = DebugVariable (N); }
397
-
398
380
// / getElementType - Get the type of the allocated memory (as opposed to the
399
381
// / (second) type of the instruction itself, which will be an address type).
400
382
SILType getElementType () const {
@@ -481,10 +463,7 @@ class AllocValueBufferInst :
481
463
class AllocBoxInst : public AllocationInst {
482
464
friend class SILBuilder ;
483
465
484
- DebugVariable VarInfo;
485
-
486
- AllocBoxInst (SILDebugLocation *DebugLoc, SILType ElementType, SILFunction &F,
487
- unsigned ArgNo);
466
+ AllocBoxInst (SILDebugLocation *DebugLoc, SILType ElementType, SILFunction &F);
488
467
489
468
public:
490
469
@@ -499,8 +478,6 @@ class AllocBoxInst : public AllocationInst {
499
478
// / allocation, or null if this is a temporary allocation.
500
479
VarDecl *getDecl () const ;
501
480
502
- DebugVariable getVarInfo () const { return VarInfo; };
503
-
504
481
ArrayRef<Operand> getAllOperands () const { return {}; }
505
482
MutableArrayRef<Operand> getAllOperands () { return {}; }
506
483
@@ -1364,34 +1341,29 @@ class MarkFunctionEscapeInst : public SILInstruction {
1364
1341
// / types).
1365
1342
class DebugValueInst : public UnaryInstructionBase <ValueKind::DebugValueInst> {
1366
1343
friend class SILBuilder ;
1367
- DebugVariable VarInfo;
1368
1344
1369
- DebugValueInst (SILDebugLocation *DebugLoc, SILValue Operand, unsigned ArgNo )
1370
- : UnaryInstructionBase(DebugLoc, Operand), VarInfo(ArgNo) {}
1345
+ DebugValueInst (SILDebugLocation *DebugLoc, SILValue Operand)
1346
+ : UnaryInstructionBase(DebugLoc, Operand) {}
1371
1347
1372
1348
public:
1373
1349
// / getDecl - Return the underlying variable declaration that this denotes,
1374
1350
// / or null if we don't have one.
1375
1351
VarDecl *getDecl () const ;
1376
- DebugVariable getVarInfo () const { return VarInfo; }
1377
1352
};
1378
1353
1379
1354
// / Define the start or update to a symbolic variable value (for address-only
1380
1355
// / types) .
1381
1356
class DebugValueAddrInst
1382
1357
: public UnaryInstructionBase<ValueKind::DebugValueAddrInst> {
1383
1358
friend class SILBuilder ;
1384
- DebugVariable VarInfo;
1385
1359
1386
- DebugValueAddrInst (SILDebugLocation *DebugLoc, SILValue Operand,
1387
- unsigned ArgNo)
1388
- : UnaryInstructionBase(DebugLoc, Operand), VarInfo(ArgNo) {}
1360
+ DebugValueAddrInst (SILDebugLocation *DebugLoc, SILValue Operand)
1361
+ : UnaryInstructionBase(DebugLoc, Operand) {}
1389
1362
1390
1363
public:
1391
1364
// / getDecl - Return the underlying variable declaration that this denotes,
1392
1365
// / or null if we don't have one.
1393
1366
VarDecl *getDecl () const ;
1394
- DebugVariable getVarInfo () const { return VarInfo; }
1395
1367
};
1396
1368
1397
1369
0 commit comments