Add helper method

llvm-svn: 4744
This commit is contained in:
Chris Lattner 2002-11-18 06:57:05 +00:00
parent 5812f06b30
commit ee285c1df9
1 changed files with 4 additions and 0 deletions

View File

@ -190,6 +190,10 @@ public:
return regNum;
}
inline unsigned getReg() const {
assert(hasAllocatedReg() && "Cannot call MachineOperand::getReg()!");
return regNum;
}
friend std::ostream& operator<<(std::ostream& os, const MachineOperand& mop);