diff options
author | Chris Lattner <sabre@nondot.org> | 2001-10-01 16:18:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-10-01 16:18:37 +0000 |
commit | 9636a91649f168f41b477cba705287665e054f79 (patch) | |
tree | 5922b723abd6338e86c5c09ecb880f129cd85401 /include/llvm/Module.h | |
parent | 7295eb4ea3e3a81e697600cbca681674e4b35a20 (diff) |
Add support for new style casts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@694 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Module.h')
-rw-r--r-- | include/llvm/Module.h | 5 |
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 |