class AbstractCallSite
Declaration
class AbstractCallSite { /* full declaration omitted */ };
Declared at: llvm/include/llvm/IR/CallSite.h:730
Method Overview
- public AbstractCallSite(const llvm::Use * U)
- public llvm::Value * getCallArgOperand(unsigned int ArgNo) const
- public llvm::Value * getCallArgOperand(llvm::Argument & Arg) const
- public int getCallArgOperandNo(unsigned int ArgNo) const
- public int getCallArgOperandNo(llvm::Argument & Arg) const
- public int getCallArgOperandNoForCallee() const
- public llvm::CallSite getCallSite() const
- public static void getCallbackUses(llvm::ImmutableCallSite ICS, SmallVectorImpl<const llvm::Use *> & CBUses)
- public llvm::Function * getCalledFunction() const
- public llvm::Value * getCalledValue() const
- public const llvm::Use & getCalleeUseForCallback() const
- public llvm::Instruction * getInstruction() const
- public unsigned int getNumArgOperands() const
- public bool isCallbackCall() const
- public bool isCallee(const llvm::Use * U) const
- public bool isCallee(Value::const_user_iterator UI) const
- public bool isDirectCall() const
- public bool isIndirectCall() const
- public bool operator bool() const
Methods
¶AbstractCallSite(const llvm::Use* U)
AbstractCallSite(const llvm::Use* U)
Description
Sole constructor for abstract call sites (ACS). An abstract call site can only be constructed through a llvm::Use because each operand (=use) of an instruction could potentially be a different abstract call site. Furthermore, even if the value of the llvm::Use is the same, and the user is as well, the abstract call sites might not be. If a use is not associated with an abstract call site the constructed ACS will evaluate to false if converted to a boolean. If the use is the callee use of a call or invoke instruction, the constructed abstract call site will behave as a llvm::CallSite would. If the use is not a callee use of a call or invoke instruction, the callback metadata is used to determine the argument < -> parameter mapping as well as the callee of the abstract call site.
Declared at: llvm/include/llvm/IR/CallSite.h:778
Parameters
- const llvm::Use* U
¶llvm::Value* getCallArgOperand(
unsigned int ArgNo) const
llvm::Value* getCallArgOperand(
unsigned int ArgNo) const
Description
Return the operand of the underlying instruction associated with the function parameter number @p ArgNo or nullptr if there is none.
Declared at: llvm/include/llvm/IR/CallSite.h:859
Parameters
- unsigned int ArgNo
¶llvm::Value* getCallArgOperand(
llvm::Argument& Arg) const
llvm::Value* getCallArgOperand(
llvm::Argument& Arg) const
Description
Return the operand of the underlying instruction associated with @p Arg.
Declared at: llvm/include/llvm/IR/CallSite.h:853
Parameters
- llvm::Argument& Arg
¶int getCallArgOperandNo(unsigned int ArgNo) const
int getCallArgOperandNo(unsigned int ArgNo) const
Description
Return the operand index of the underlying instruction associated with the function parameter number @p ArgNo or -1 if there is none.
Declared at: llvm/include/llvm/IR/CallSite.h:845
Parameters
- unsigned int ArgNo
¶int getCallArgOperandNo(llvm::Argument& Arg) const
int getCallArgOperandNo(llvm::Argument& Arg) const
Description
Return the operand index of the underlying instruction associated with @p Arg.
Declared at: llvm/include/llvm/IR/CallSite.h:839
Parameters
- llvm::Argument& Arg
¶int getCallArgOperandNoForCallee() const
int getCallArgOperandNoForCallee() const
Description
Return the operand index of the underlying instruction associated with the callee of this ACS. Only valid for callback calls!
Declared at: llvm/include/llvm/IR/CallSite.h:870
¶llvm::CallSite getCallSite() const
llvm::CallSite getCallSite() const
Description
Return the call site abstraction for the underlying instruction.
Declared at: llvm/include/llvm/IR/CallSite.h:794
¶static void getCallbackUses(
llvm::ImmutableCallSite ICS,
SmallVectorImpl<const llvm::Use*>& CBUses)
static void getCallbackUses(
llvm::ImmutableCallSite ICS,
SmallVectorImpl<const llvm::Use*>& CBUses)
Description
Add operand uses of \p ICS that represent callback uses into \p CBUses. All uses added to \p CBUses can be used to create abstract call sites for which AbstractCallSite::isCallbackCall() will return true.
Declared at: llvm/include/llvm/IR/CallSite.h:784
Parameters
- llvm::ImmutableCallSite ICS
- SmallVectorImpl<const llvm::Use*>& CBUses
¶llvm::Function* getCalledFunction() const
llvm::Function* getCalledFunction() const
Description
Return the function being called if this is a direct call, otherwise return null (if it's an indirect call).
Declared at: llvm/include/llvm/IR/CallSite.h:894
¶llvm::Value* getCalledValue() const
llvm::Value* getCalledValue() const
Description
Return the pointer to function that is being called.
Declared at: llvm/include/llvm/IR/CallSite.h:886
¶const llvm::Use& getCalleeUseForCallback() const
const llvm::Use& getCalleeUseForCallback() const
Description
Return the use of the callee value in the underlying instruction. Only valid for callback calls!
Declared at: llvm/include/llvm/IR/CallSite.h:878
¶llvm::Instruction* getInstruction() const
llvm::Instruction* getInstruction() const
Description
Return the underlying instruction.
Declared at: llvm/include/llvm/IR/CallSite.h:791
¶unsigned int getNumArgOperands() const
unsigned int getNumArgOperands() const
Description
Return the number of parameters of the callee.
Declared at: llvm/include/llvm/IR/CallSite.h:830
¶bool isCallbackCall() const
bool isCallbackCall() const
Description
Return true if this ACS represents a callback call.
Declared at: llvm/include/llvm/IR/CallSite.h:807
¶bool isCallee(const llvm::Use* U) const
bool isCallee(const llvm::Use* U) const
Description
Return true if @p U is the use that defines the callee of this ACS.
Declared at: llvm/include/llvm/IR/CallSite.h:819
Parameters
- const llvm::Use* U
¶bool isCallee(Value::const_user_iterator UI) const
bool isCallee(Value::const_user_iterator UI) const
Description
Return true if @p UI is the use that defines the callee of this ACS.
Declared at: llvm/include/llvm/IR/CallSite.h:814
Parameters
¶bool isDirectCall() const
bool isDirectCall() const
Description
Return true if this ACS represents a direct call.
Declared at: llvm/include/llvm/IR/CallSite.h:797
¶bool isIndirectCall() const
bool isIndirectCall() const
Description
Return true if this ACS represents an indirect call.
Declared at: llvm/include/llvm/IR/CallSite.h:802
¶bool operator bool() const
bool operator bool() const
Description
Conversion operator to conveniently check for a valid/initialized ACS.
Declared at: llvm/include/llvm/IR/CallSite.h:788