aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-05-29 19:53:46 +0000
committerDan Gohman <gohman@apple.com>2008-05-29 19:53:46 +0000
commitb99e2e20b2ad1e7c5bf613fba4ead50e9654876c (patch)
tree27a91670dee18e3134b5cda62479ba56990b28c3 /lib
parent1baa88e3de8947b02d9ef4caa73e5860f048ec6e (diff)
downloadexternal_llvm-b99e2e20b2ad1e7c5bf613fba4ead50e9654876c.zip
external_llvm-b99e2e20b2ad1e7c5bf613fba4ead50e9654876c.tar.gz
external_llvm-b99e2e20b2ad1e7c5bf613fba4ead50e9654876c.tar.bz2
const-ify getOpcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51698 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 8c2dc3e..74e6b6f 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/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;