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, 7 insertions, 0 deletions
diff --git a/include/llvm/MC/MCInst.h b/include/llvm/MC/MCInst.h
index 9bf440ea96d21..db28fd0fd6d9d 100644
--- a/include/llvm/MC/MCInst.h
+++ b/include/llvm/MC/MCInst.h
@@ -160,6 +160,10 @@ class MCInst {
unsigned Opcode = 0;
SMLoc Loc;
SmallVector<MCOperand, 8> Operands;
+ // These flags could be used to pass some info from one target subcomponent
+ // to another, for example, from disassembler to asm printer. The values of
+ // the flags have any sense on target level only (e.g. prefixes on x86).
+ unsigned Flags = 0;
public:
MCInst() = default;
@@ -167,6 +171,9 @@ public:
void setOpcode(unsigned Op) { Opcode = Op; }
unsigned getOpcode() const { return Opcode; }
+ void setFlags(unsigned F) { Flags = F; }
+ unsigned getFlags() const { return Flags; }
+
void setLoc(SMLoc loc) { Loc = loc; }
SMLoc getLoc() const { return Loc; }