diff options
| author | Dan Gohman <gohman@apple.com> | 2008-05-29 19:53:46 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2008-05-29 19:53:46 +0000 |
| commit | 86ff8536f9a88f7576c1a8bc117fcbc55f315f53 (patch) | |
| tree | ae09b1302ad5048a52c5a1caeeabf65bd387f462 /llvm/lib | |
| parent | 18e29d077202484f0c514559e90b2b574d172e72 (diff) | |
| download | bcm5719-llvm-86ff8536f9a88f7576c1a8bc117fcbc55f315f53.tar.gz bcm5719-llvm-86ff8536f9a88f7576c1a8bc117fcbc55f315f53.zip | |
const-ify getOpcode.
llvm-svn: 51698
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 8c2dc3e92f4..74e6b6f6b06 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -603,10 +603,10 @@ static User *dyn_castGetElementPtr(Value *V) { /// getOpcode - If this is an Instruction or a ConstantExpr, return the /// opcode value. Otherwise return UserOp1. -static unsigned getOpcode(Value *V) { - if (Instruction *I = dyn_cast<Instruction>(V)) +static unsigned getOpcode(const Value *V) { + if (const Instruction *I = dyn_cast<Instruction>(V)) return I->getOpcode(); - if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) + if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) return CE->getOpcode(); // Use UserOp1 to mean there's no opcode. return Instruction::UserOp1; |

