aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/CallSite.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Support/CallSite.h b/include/llvm/Support/CallSite.h
index 8f7cf1a786..009bd6ae1a 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 {