LLVM API Documentation

llvm::CallSite Class Reference

#include <CallSite.h>

Collaboration diagram for llvm::CallSite:

Collaboration graph
[legend]
List of all members.

Public Types

typedef User::op_iterator arg_iterator

Public Member Functions

 CallSite ()
 CallSite (CallInst *CI)
 CallSite (InvokeInst *II)
 CallSite (const CallSite &CS)
CallSiteoperator= (const CallSite &CS)
unsigned getCallingConv () const
void setCallingConv (unsigned CC)
const TypegetType () const
InstructiongetInstruction () const
FunctiongetCaller () const
ValuegetCalledValue () const
FunctiongetCalledFunction () const
void setCalledFunction (Value *V)
ValuegetArgument (unsigned ArgNo) const
arg_iterator arg_begin () const
arg_iterator arg_end () const
unsigned arg_size () const
bool operator< (const CallSite &CS) const

Static Public Member Functions

static CallSite get (Value *V)

Detailed Description

Definition at line 31 of file CallSite.h.


Member Typedef Documentation

typedef User::op_iterator llvm::CallSite::arg_iterator

arg_iterator - The type of iterator to use when looping over actual arguments at this call site...

Definition at line 100 of file CallSite.h.


Constructor & Destructor Documentation

llvm::CallSite::CallSite (  )  [inline]

Definition at line 34 of file CallSite.h.

Referenced by get().

llvm::CallSite::CallSite ( CallInst CI  )  [inline]

Definition at line 35 of file CallSite.h.

llvm::CallSite::CallSite ( InvokeInst II  )  [inline]

Definition at line 36 of file CallSite.h.

llvm::CallSite::CallSite ( const CallSite CS  )  [inline]

Definition at line 37 of file CallSite.h.


Member Function Documentation

arg_iterator llvm::CallSite::arg_begin (  )  const [inline]

arg_begin/arg_end - Return iterators corresponding to the actual argument list for a call site.

Definition at line 105 of file CallSite.h.

References llvm::Instruction::Call, llvm::Instruction::getOpcode(), and llvm::User::op_begin().

Referenced by AddressIsTaken(), arg_size(), CallPassesValueThoughVararg(), getArgument(), llvm::DSGraph::getDSCallSiteForCallSite(), llvm::InlineFunction(), isOnlyADirectCall(), and llvm::Interpreter::visitCallSite().

arg_iterator llvm::CallSite::arg_end (  )  const [inline]

Definition at line 112 of file CallSite.h.

References llvm::User::op_end().

Referenced by AddressIsTaken(), arg_size(), CallPassesValueThoughVararg(), getArgument(), llvm::DSGraph::getDSCallSiteForCallSite(), llvm::InlineFunction(), isOnlyADirectCall(), and llvm::Interpreter::visitCallSite().

unsigned llvm::CallSite::arg_size (  )  const [inline]

Definition at line 113 of file CallSite.h.

References arg_begin(), and arg_end().

Referenced by llvm::Interpreter::visitCallSite().

static CallSite llvm::CallSite::get ( Value V  )  [inline, static]

CallSite::get - This static method is sort of like a constructor. It will create an appropriate call site for a Call or Invoke instruction, but it can also create a null initialized CallSite object for something which is NOT a call site.

Definition at line 45 of file CallSite.h.

References llvm::Instruction::Call, CallSite(), llvm::Instruction::getOpcode(), and V.

Referenced by llvm::Inliner::runOnSCC().

Value* llvm::CallSite::getArgument ( unsigned  ArgNo  )  const [inline]

Definition at line 93 of file CallSite.h.

References arg_begin(), and arg_end().

Function* llvm::CallSite::getCalledFunction (  )  const [inline]

getCalledFunction - Return the function being called if this is a direct call, otherwise return null (if it's an indirect call).

Definition at line 82 of file CallSite.h.

References getCalledValue().

Referenced by llvm::AliasSetTracker::add(), llvm::DSGraph::getDSCallSiteForCallSite(), llvm::AliasAnalysis::getModRefInfo(), InlineCallIfPossible(), llvm::InlineFunction(), llvm::AliasSetTracker::remove(), and llvm::Interpreter::visitCallSite().

Value* llvm::CallSite::getCalledValue (  )  const [inline]

getCalledValue - Return the pointer to function that is being called...

Definition at line 74 of file CallSite.h.

References llvm::User::getOperand().

Referenced by CallPassesValueThoughVararg(), getCalledFunction(), llvm::EquivClassGraphs::getSomeCalleeForCallSite(), and llvm::Interpreter::visitCallSite().

Function* llvm::CallSite::getCaller (  )  const [inline]

getCaller - Return the caller function for this call site

Definition at line 70 of file CallSite.h.

References llvm::BasicBlock::getParent(), and llvm::Instruction::getParent().

Referenced by llvm::EquivClassGraphs::getSomeCalleeForCallSite().

unsigned CallSite::getCallingConv (  )  const

getCallingConv/setCallingConv - get or set the calling convention of the call.

Definition at line 23 of file Instructions.cpp.

Instruction* llvm::CallSite::getInstruction (  )  const [inline]

getInstruction - Return the instruction this call site corresponds to

Definition at line 66 of file CallSite.h.

Referenced by CallersAllIgnoreReturnValue(), llvm::DSCallSite::getCaller(), llvm::DSGraph::getDSCallSiteForCallSite(), InlineCallIfPossible(), llvm::InlineFunction(), isOnlyADirectCall(), operator<(), llvm::Inliner::runOnSCC(), and llvm::Interpreter::visitCallSite().

const Type* llvm::CallSite::getType (  )  const [inline]

getType - Return the type of the instruction that generated this call site

Definition at line 62 of file CallSite.h.

References llvm::Value::getType().

bool llvm::CallSite::operator< ( const CallSite CS  )  const [inline]

Definition at line 115 of file CallSite.h.

References getInstruction().

CallSite& llvm::CallSite::operator= ( const CallSite CS  )  [inline]

Definition at line 38 of file CallSite.h.

References I.

void llvm::CallSite::setCalledFunction ( Value V  )  [inline]

setCalledFunction - Set the callee to the specified value...

Definition at line 88 of file CallSite.h.

References llvm::User::setOperand(), and V.

void CallSite::setCallingConv ( unsigned  CC  ) 

Definition at line 29 of file Instructions.cpp.


The documentation for this class was generated from the following files: