aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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; }