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