summaryrefslogtreecommitdiff
path: root/include/llvm/User.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-06-26 20:51:50 +0000
committerChris Lattner <sabre@nondot.org>2004-06-26 20:51:50 +0000
commit0b0863778fd5e9e8ef8e9858906a6c2e1f302d5a (patch)
treed6cc1657a3a4db1aa046634ebb10d797f0e2c29b /include/llvm/User.h
parent3d4bd5aa8de96e5ab9382db6a083eb86ddc54f89 (diff)
downloadllvm-0b0863778fd5e9e8ef8e9858906a6c2e1f302d5a.tar.gz
llvm-0b0863778fd5e9e8ef8e9858906a6c2e1f302d5a.tar.bz2
llvm-0b0863778fd5e9e8ef8e9858906a6c2e1f302d5a.tar.xz
Consider anything with a ValueType that is >= Instruction to be an instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14429 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/User.h')
-rw-r--r--include/llvm/User.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/llvm/User.h b/include/llvm/User.h
index 0482189b6d..e45afdca68 100644
--- a/include/llvm/User.h
+++ b/include/llvm/User.h
@@ -86,9 +86,8 @@ public:
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const User *) { return true; }
static inline bool classof(const Value *V) {
- return V->getValueType() == Value::GlobalVariableVal ||
- V->getValueType() == Value::ConstantVal ||
- V->getValueType() == Value::InstructionVal;
+ return isa<Instruction>(V) || isa<GlobalVariable>(V) ||
+ isa<Constant>(V);
}
};