Move getType() and getCaller() into CallSiteBase so that

ImmutableCallSite can use them too.

llvm-svn: 101279
This commit is contained in:
Dan Gohman 2010-04-14 20:28:44 +00:00
parent 2fb18b746f
commit 0ebddbe1d9
1 changed files with 8 additions and 8 deletions

View File

@ -175,6 +175,14 @@ private:
else
return getInstruction()->op_end() - 3; // Skip BB, BB, Function
}
/// getType - Return the type of the instruction that generated this call site
///
const Type *getType() const { return (*this)->getType(); }
/// getCaller - Return the caller function for this call site
///
Function *getCaller() const { return (*this)->getParent()->getParent(); }
};
/// ImmutableCallSite - establish a view to a call site for examination
@ -246,14 +254,6 @@ public:
bool doesNotThrow() const;
void setDoesNotThrow(bool doesNotThrow = true);
/// getType - Return the type of the instruction that generated this call site
///
const Type *getType() const { return (*this)->getType(); }
/// getCaller - Return the caller function for this call site
///
Function *getCaller() const { return (*this)->getParent()->getParent(); }
/// hasArgument - Returns true if this CallSite passes the given Value* as an
/// argument to the called function.
bool hasArgument(const Value *Arg) const;