[llvm-commits] CVS: llvm/include/llvm/Support/CallSite.h

Vikram Adve vadve at cs.uiuc.edu
Sun May 23 03:03:00 PDT 2004


Changes in directory llvm/include/llvm/Support:

CallSite.h updated: 1.13 -> 1.14

---
Log message:

Add getCaller() method.


---
Diffs of the changes:  (+5 -0)

Index: llvm/include/llvm/Support/CallSite.h
diff -u llvm/include/llvm/Support/CallSite.h:1.13 llvm/include/llvm/Support/CallSite.h:1.14
--- llvm/include/llvm/Support/CallSite.h:1.13	Tue Nov 11 16:41:31 2003
+++ llvm/include/llvm/Support/CallSite.h	Sun May 23 03:02:45 2004
@@ -22,6 +22,7 @@
 #define LLVM_SUPPORT_CALLSITE_H
 
 #include "llvm/Instruction.h"
+#include "llvm/BasicBlock.h"
 
 namespace llvm {
 
@@ -59,6 +60,10 @@
   /// getInstruction - Return the instruction this call site corresponds to
   ///
   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...
   ///





More information about the llvm-commits mailing list