diff options
author | Chris Lattner <sabre@nondot.org> | 2001-10-01 13:58:13 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-10-01 13:58:13 +0000 |
commit | 7295eb4ea3e3a81e697600cbca681674e4b35a20 (patch) | |
tree | 142d6b6d26c0be5a9588e6c99970b83ad25744af /include/llvm/Instruction.h | |
parent | 6bad546c2a4eac51eabc6ac398861dcf7d5f18bb (diff) | |
download | llvm-7295eb4ea3e3a81e697600cbca681674e4b35a20.tar.gz llvm-7295eb4ea3e3a81e697600cbca681674e4b35a20.tar.bz2 llvm-7295eb4ea3e3a81e697600cbca681674e4b35a20.tar.xz |
Add support for newer cleaner isa, cast, dyn_cast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@693 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Instruction.h')
-rw-r--r-- | include/llvm/Instruction.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Instruction.h b/include/llvm/Instruction.h index 3bbb8e7031..93b68a2c62 100644 --- a/include/llvm/Instruction.h +++ b/include/llvm/Instruction.h @@ -85,6 +85,13 @@ public: // and then drops all references to its operands. // void dropAllReferences(); + + + // Methods for support type inquiry through isa, cast, and dyn_cast: + static inline bool isa(const Instruction *I) { return true; } + static inline bool isa(const Value *V) { + return V->getValueType() == Value::InstructionVal; + } //---------------------------------------------------------------------- // Exported enumerations... |