diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2004-05-23 08:02:45 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2004-05-23 08:02:45 +0000 |
commit | b5b0b45e58ea0b83e79dcee00b51a0149535ed2a (patch) | |
tree | 053bcd995f3ee3cc5c7e807a70b82b42a6f9f9ff /include/llvm/Support | |
parent | 052682f1c34859e1736cd7326d75eda946287ec9 (diff) | |
download | external_llvm-b5b0b45e58ea0b83e79dcee00b51a0149535ed2a.zip external_llvm-b5b0b45e58ea0b83e79dcee00b51a0149535ed2a.tar.gz external_llvm-b5b0b45e58ea0b83e79dcee00b51a0149535ed2a.tar.bz2 |
Add getCaller() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13650 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-rw-r--r-- | include/llvm/Support/CallSite.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Support/CallSite.h b/include/llvm/Support/CallSite.h index 8f7cf1a..009bd6a 100644 --- a/include/llvm/Support/CallSite.h +++ b/include/llvm/Support/CallSite.h @@ -22,6 +22,7 @@ #define LLVM_SUPPORT_CALLSITE_H #include "llvm/Instruction.h" +#include "llvm/BasicBlock.h" namespace llvm { @@ -60,6 +61,10 @@ public: /// Instruction *getInstruction() const { return I; } + /// getCaller - Return the caller function for this call site + /// + Function *getCaller() const { return I->getParent()->getParent(); } + /// getCalledValue - Return the pointer to function that is being called... /// Value *getCalledValue() const { |