else
I->setOperand(ArgNo+3, newVal); // Skip Function, BB, BB
}
+
+ /// hasArgument - Returns true if this CallSite passes the given Value* as an
+ /// argument to the called function.
+ bool hasArgument(Value *Arg);
/// arg_iterator - The type of iterator to use when looping over actual
/// arguments at this call site...
cast<InvokeInst>(I)->setDoesNotThrow(doesNotThrow);
}
+bool CallSite::hasArgument(Value *Arg) {
+ for (arg_iterator AI = this->arg_begin(), E = this->arg_end(); AI != E; ++AI)
+ if (AI->get() == Arg)
+ return true;
+ return false;
+}
+
//===----------------------------------------------------------------------===//
// TerminatorInst Class
//===----------------------------------------------------------------------===//