File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1050,6 +1050,11 @@ class Operand {
1050
1050
SILBasicBlock *getParentBlock () const ;
1051
1051
SILFunction *getParentFunction () const ;
1052
1052
1053
+ LLVM_ATTRIBUTE_DEPRECATED (
1054
+ void dump () const LLVM_ATTRIBUTE_USED,
1055
+ "Dump the operand's state. Only for use in the debugger!");
1056
+ void print (llvm::raw_ostream &os) const ;
1057
+
1053
1058
private:
1054
1059
void removeFromCurrent () {
1055
1060
if (!Back)
Original file line number Diff line number Diff line change @@ -347,6 +347,16 @@ bool Operand::isConsuming() const {
347
347
return get ().getOwnershipKind () != OwnershipKind::None;
348
348
}
349
349
350
+ void Operand::dump () const { print (llvm::dbgs ()); }
351
+
352
+ void Operand::print (llvm::raw_ostream &os) const {
353
+ os << " Operand.\n "
354
+ " Owner: "
355
+ << *Owner << " Value: " << get () << " Operand Number: " << getOperandNumber ()
356
+ << ' \n '
357
+ << " Is Type Dependent: " << (isTypeDependent () ? " yes" : " no" ) << ' \n ' ;
358
+ }
359
+
350
360
// ===----------------------------------------------------------------------===//
351
361
// OperandConstraint
352
362
// ===----------------------------------------------------------------------===//
You can’t perform that action at this time.
0 commit comments