mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 06:33:24 +00:00
Implement correct isa<UnaryInstruction>, problem reported by "ST".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44697 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b48519cbad
commit
edfd10de87
@ -108,6 +108,20 @@ public:
|
||||
Op = Val;
|
||||
}
|
||||
unsigned getNumOperands() const { return 1; }
|
||||
|
||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||
static inline bool classof(const UnaryInstruction *) { return true; }
|
||||
static inline bool classof(const Instruction *I) {
|
||||
return I->getOpcode() == Instruction::Malloc ||
|
||||
I->getOpcode() == Instruction::Alloca ||
|
||||
I->getOpcode() == Instruction::Free ||
|
||||
I->getOpcode() == Instruction::Load ||
|
||||
I->getOpcode() == Instruction::VAArg ||
|
||||
(I->getOpcode() >= CastOpsBegin && I->getOpcode() < CastOpsEnd);
|
||||
}
|
||||
static inline bool classof(const Value *V) {
|
||||
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
||||
}
|
||||
};
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
Loading…
x
Reference in New Issue
Block a user