summaryrefslogtreecommitdiff
path: root/include/llvm/MC/MCInst.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/MC/MCInst.h')
-rw-r--r--include/llvm/MC/MCInst.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/llvm/MC/MCInst.h b/include/llvm/MC/MCInst.h
index cadc23ab7109..457c2ae2ee65 100644
--- a/include/llvm/MC/MCInst.h
+++ b/include/llvm/MC/MCInst.h
@@ -13,10 +13,10 @@
//
//===----------------------------------------------------------------------===//
-
#ifndef LLVM_MC_MCINST_H
#define LLVM_MC_MCINST_H
+#include "llvm/MC/MCImm.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/DebugLoc.h"
@@ -30,13 +30,15 @@ class MCOperand {
kInvalid, ///< Uninitialized.
kRegister, ///< Register operand.
kImmediate, ///< Immediate operand.
- kMBBLabel ///< Basic block label.
+ kMBBLabel, ///< Basic block label.
+ kMCImm
};
unsigned char Kind;
union {
unsigned RegVal;
int64_t ImmVal;
+ MCImm MCImmVal;
struct {
unsigned FunctionNo;
unsigned BlockNo;
@@ -112,6 +114,7 @@ public:
const MCOperand &getOperand(unsigned i) const { return Operands[i]; }
MCOperand &getOperand(unsigned i) { return Operands[i]; }
+ unsigned getNumOperands() const { return Operands.size(); }
void addOperand(const MCOperand &Op) {
Operands.push_back(Op);