From: Chris Lattner Date: Mon, 18 Nov 2002 06:57:05 +0000 (+0000) Subject: Add helper method X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=ce3d3eadef1c2a72a0a6e16735e5091fb1e6dc16;p=oota-llvm.git Add helper method git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4744 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index fb6e46040a7..833a4a13e6d 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -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);