projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
365f54c
)
I demand the ability to say 'if (isa<Value>(V))'!
author
Chris Lattner
<sabre@nondot.org>
Fri, 30 Jul 2004 06:59:15 +0000
(06:59 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 30 Jul 2004 06:59:15 +0000
(06:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15340
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Value.h
patch
|
blob
|
history
diff --git
a/include/llvm/Value.h
b/include/llvm/Value.h
index 73501995fde5ef75fcf8eb592e48b0aedf706083..f12eac3ed186cd4069096af0af24182254f12573 100644
(file)
--- 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; }