Chromium Code Reviews| Index: src/IceInst.cpp |
| diff --git a/src/IceInst.cpp b/src/IceInst.cpp |
| index af7152f0a690b8b221b58ae9d0a35b4234fbb60d..bec842100a97d25a01d5c5f5b374c2c65fbabf99 100644 |
| --- a/src/IceInst.cpp |
| +++ b/src/IceInst.cpp |
| @@ -228,6 +228,12 @@ InstArithmetic::InstArithmetic(Cfg *Func, OpKind Op, Variable *Dest, |
| addSource(Source2); |
| } |
| +const char *InstArithmetic::getOpName(OpKind Op) { |
| + size_t OpIndex = static_cast<size_t>(Op); |
| + return OpIndex < InstArithmeticAttributesSize |
|
Jim Stichnoth
2014/08/01 18:05:33
Instead of "OpIndex < InstArithmeticAttributesSize
Karl
2014/08/25 17:46:53
Done.
|
| + ? InstArithmeticAttributes[OpIndex].DisplayString : "???"; |
| +} |
| + |
| bool InstArithmetic::isCommutative() const { |
| return InstArithmeticAttributes[getOp()].IsCommutative; |
| } |