projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
94572e0
)
Add an function to BinaryOperator to swap the two operands
author
Chris Lattner
<sabre@nondot.org>
Fri, 20 Jul 2001 19:09:33 +0000
(19:09 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 20 Jul 2001 19:09:33 +0000
(19:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/InstrTypes.h
patch
|
blob
|
history
diff --git
a/include/llvm/InstrTypes.h
b/include/llvm/InstrTypes.h
index fa0ce87c9ca78104f6f4c2a1ddd4e82b61a149f4..1f771e635010cacfe0307c3643fab3d8178b1343 100644
(file)
--- 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