llvm.org GIT mirror llvm / 26e129e
Add classof implementations for User git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@739 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 19 years ago
1 changed file(s) with 8 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
6363 //
6464 void replaceUsesOfWith(Value *From, Value *To);
6565
66 // Methods for support type inquiry through isa, cast, and dyn_cast:
67 static inline bool classof(const User *) { return true; }
68 static inline bool classof(const Value *V) {
69 return V->getValueType() == Value::GlobalVariableVal ||
70 V->getValueType() == Value::ConstantVal ||
71 V->getValueType() == Value::InstructionVal;
72 }
73
6674 // addOperand - This is a special purpose API that should not be used in most
6775 // cases. It adds an empty (null) operand to the instruction specified. This
6876 // is currently used by the back end as part of the "lowering" process... most