[llvm-commits] [llvm] r101279 - /llvm/trunk/include/llvm/Support/CallSite.h

Dan Gohman gohman at apple.com
Wed Apr 14 13:28:44 PDT 2010


Author: djg
Date: Wed Apr 14 15:28:44 2010
New Revision: 101279

URL: http://llvm.org/viewvc/llvm-project?rev=101279&view=rev
Log:
Move getType() and getCaller() into CallSiteBase so that
ImmutableCallSite can use them too.

Modified:
    llvm/trunk/include/llvm/Support/CallSite.h

Modified: llvm/trunk/include/llvm/Support/CallSite.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CallSite.h?rev=101279&r1=101278&r2=101279&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/CallSite.h (original)
+++ llvm/trunk/include/llvm/Support/CallSite.h Wed Apr 14 15:28:44 2010
@@ -175,6 +175,14 @@
     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 @@
   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;





More information about the llvm-commits mailing list