aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Function.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Function.h')
-rw-r--r--include/llvm/Function.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h
index a7075af0cc..f6c8aa214c 100644
--- a/include/llvm/Function.h
+++ b/include/llvm/Function.h
@@ -92,6 +92,11 @@ public:
inline BasicBlock *back() { return BasicBlocks.back(); }
+ // Methods for support type inquiry through isa, cast, and dyn_cast:
+ static inline bool isa(const Method *T) { return true; }
+ static inline bool isa(const Value *V) {
+ return V->getValueType() == Value::MethodVal;
+ }
// dropAllReferences() - This function causes all the subinstructions to "let
// go" of all references that they are maintaining. This allows one to