MachineOperand: Add dump() method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287302 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Matthias Braun 2016-11-18 02:40:40 +00:00
parent bc5bb8c0ae
commit 3962c3afbc
2 changed files with 7 additions and 0 deletions

View File

@ -229,6 +229,7 @@ public:
void print(raw_ostream &os, ModuleSlotTracker &MST,
const TargetRegisterInfo *TRI = nullptr,
const TargetIntrinsicInfo *IntrinsicInfo = nullptr) const;
LLVM_DUMP_METHOD void dump() const;
//===--------------------------------------------------------------------===//
// Accessors that tell you what kind of MachineOperand you're looking at.

View File

@ -497,6 +497,12 @@ void MachineOperand::print(raw_ostream &OS, ModuleSlotTracker &MST,
OS << "[TF=" << TF << ']';
}
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
LLVM_DUMP_METHOD void MachineOperand::dump() const {
dbgs() << *this << '\n';
}
#endif
//===----------------------------------------------------------------------===//
// MachineMemOperand Implementation
//===----------------------------------------------------------------------===//