diff options
Diffstat (limited to 'include/llvm/MC/MCInst.h')
-rw-r--r-- | include/llvm/MC/MCInst.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/llvm/MC/MCInst.h b/include/llvm/MC/MCInst.h index db28fd0fd6d9..67bb11a70387 100644 --- a/include/llvm/MC/MCInst.h +++ b/include/llvm/MC/MCInst.h @@ -30,7 +30,7 @@ class MCInst; class MCInstPrinter; class raw_ostream; -/// \brief Instances of this class represent operands of the MCInst class. +/// Instances of this class represent operands of the MCInst class. /// This is a simple discriminated union. class MCOperand { enum MachineOperandType : unsigned char { @@ -61,13 +61,13 @@ public: bool isExpr() const { return Kind == kExpr; } bool isInst() const { return Kind == kInst; } - /// \brief Returns the register number. + /// Returns the register number. unsigned getReg() const { assert(isReg() && "This is not a register operand!"); return RegVal; } - /// \brief Set the register number. + /// Set the register number. void setReg(unsigned Reg) { assert(isReg() && "This is not a register operand!"); RegVal = Reg; @@ -150,11 +150,13 @@ public: void print(raw_ostream &OS) const; void dump() const; + bool isBareSymbolRef() const; + bool evaluateAsConstantImm(int64_t &Imm) const; }; template <> struct isPodLike<MCOperand> { static const bool value = true; }; -/// \brief Instances of this class represent a single low-level machine +/// Instances of this class represent a single low-level machine /// instruction. class MCInst { unsigned Opcode = 0; @@ -201,7 +203,7 @@ public: void print(raw_ostream &OS) const; void dump() const; - /// \brief Dump the MCInst as prettily as possible using the additional MC + /// Dump the MCInst as prettily as possible using the additional MC /// structures, if given. Operators are separated by the \p Separator /// string. void dump_pretty(raw_ostream &OS, const MCInstPrinter *Printer = nullptr, |