Skip to content
Snippets Groups Projects
Commit 6a19d49f authored by Chris Lattner's avatar Chris Lattner
Browse files

Add isa,cast,dyncast support for AllocationInst.

llvm-svn: 1915
parent 8280198b
No related branches found
No related tags found
No related merge requests found
......@@ -58,6 +58,16 @@ public:
}
virtual Instruction *clone() const = 0;
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const AllocationInst *) { return true; }
static inline bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::Alloca ||
I->getOpcode() == Instruction::Malloc;
}
static inline bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment