aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-04-14 20:28:44 +0000
committerDan Gohman <gohman@apple.com>2010-04-14 20:28:44 +0000
commitd9587fddd65c874ecc70771dc76119ceb4b1500c (patch)
treed6f8eaa8cecb58e77f00b33574b1c68dfbbb6c0d /include/llvm
parentdda54eef2378aedf41d4bce1e71832ffb2c0f8e1 (diff)
downloadexternal_llvm-d9587fddd65c874ecc70771dc76119ceb4b1500c.zip
external_llvm-d9587fddd65c874ecc70771dc76119ceb4b1500c.tar.gz
external_llvm-d9587fddd65c874ecc70771dc76119ceb4b1500c.tar.bz2
Move getType() and getCaller() into CallSiteBase so that
ImmutableCallSite can use them too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101279 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Support/CallSite.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/llvm/Support/CallSite.h b/include/llvm/Support/CallSite.h
index c7a438e..83a472e 100644
--- a/include/llvm/Support/CallSite.h
+++ b/include/llvm/Support/CallSite.h
@@ -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;