Operands.push_back(Use(CI.Operands[i], this));
}
-const Function *CallInst::getCalledFunction() const {
- if (const Function *F = dyn_cast<Function>(Operands[0]))
- return F;
- return 0;
-}
-Function *CallInst::getCalledFunction() {
- if (Function *F = dyn_cast<Function>(Operands[0]))
- return F;
- return 0;
-}
-
//===----------------------------------------------------------------------===//
// InvokeInst Implementation
Operands.push_back(Use(CI.Operands[i], this));
}
-const Function *InvokeInst::getCalledFunction() const {
- if (const Function *F = dyn_cast<Function>(Operands[0]))
- return F;
- return 0;
-}
-Function *InvokeInst::getCalledFunction() {
- if (Function *F = dyn_cast<Function>(Operands[0]))
- return F;
- return 0;
-}
-
-// FIXME: Is this supposed to be here?
-Function *CallSite::getCalledFunction() const {
- Value *Callee = getCalledValue();
- if (Function *F = dyn_cast<Function>(Callee))
- return F;
- return 0;
-}
-
//===----------------------------------------------------------------------===//
// ReturnInst Implementation
//===----------------------------------------------------------------------===//