summaryrefslogtreecommitdiff
path: root/include/llvm/Instruction.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-01 13:58:13 +0000
committerChris Lattner <sabre@nondot.org>2001-10-01 13:58:13 +0000
commit7295eb4ea3e3a81e697600cbca681674e4b35a20 (patch)
tree142d6b6d26c0be5a9588e6c99970b83ad25744af /include/llvm/Instruction.h
parent6bad546c2a4eac51eabc6ac398861dcf7d5f18bb (diff)
downloadllvm-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.h7
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...