aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/InstrTypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/InstrTypes.h')
-rw-r--r--include/llvm/InstrTypes.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/InstrTypes.h b/include/llvm/InstrTypes.h
index fa0ce87..1f771e6 100644
--- a/include/llvm/InstrTypes.h
+++ b/include/llvm/InstrTypes.h
@@ -108,6 +108,11 @@ public:
}
virtual const char *getOpcodeName() const = 0;
+
+ // swapOperands - Exchange the two operands to this instruction
+ void swapOperands() {
+ swap(Operands[0], Operands[1]);
+ }
};
#endif