From 9636a91649f168f41b477cba705287665e054f79 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 1 Oct 2001 16:18:37 +0000 Subject: Add support for new style casts git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@694 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Module.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/llvm/Module.h') 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 -- cgit v1.2.3