mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 03:36:37 +00:00
Add an function to BinaryOperator to swap the two operands
llvm-svn: 206
This commit is contained in:
parent
ad8051b0b3
commit
2d4f9e0995
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user