mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-22 12:08:33 +00:00
const-ify getOpcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51698 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1baa88e3de
commit
b99e2e20b2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user