summaryrefslogtreecommitdiff
path: root/include/llvm/Value.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-07-30 06:59:15 +0000
committerChris Lattner <sabre@nondot.org>2004-07-30 06:59:15 +0000
commitff8c1b3dc6766d534878613f6db511edb33ba44f (patch)
tree7d57d8bd683f3c2e9b9e635e29ddda528233f8c2 /include/llvm/Value.h
parent365f54c7bc32c13e9c3919bbc37f32192b5cb354 (diff)
downloadllvm-ff8c1b3dc6766d534878613f6db511edb33ba44f.tar.gz
llvm-ff8c1b3dc6766d534878613f6db511edb33ba44f.tar.bz2
llvm-ff8c1b3dc6766d534878613f6db511edb33ba44f.tar.xz
I demand the ability to say 'if (isa<Value>(V))'!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15340 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Value.h')
-rw-r--r--include/llvm/Value.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Value.h b/include/llvm/Value.h
index 73501995fd..f12eac3ed1 100644
--- a/include/llvm/Value.h
+++ b/include/llvm/Value.h
@@ -136,6 +136,11 @@ public:
return SubclassID;
}
+ // Methods for support type inquiry through isa, cast, and dyn_cast:
+ static inline bool classof(const Value *V) {
+ return true; // Values are always values.
+ }
+
private:
/// FIXME: this is a gross hack, needed by another gross hack. Eliminate!
void setValueType(unsigned VT) { SubclassID = VT; }