[llvm-commits] CVS: llvm/include/llvm/Value.h

Chris Lattner lattner at cs.uiuc.edu
Thu Jul 29 23:59:26 PDT 2004



Changes in directory llvm/include/llvm:

Value.h updated: 1.60 -> 1.61

---
Log message:

I demand the ability to say 'if (isa<Value>(V))'!


---
Diffs of the changes:  (+5 -0)

Index: llvm/include/llvm/Value.h
diff -u llvm/include/llvm/Value.h:1.60 llvm/include/llvm/Value.h:1.61
--- llvm/include/llvm/Value.h:1.60	Sun Jul 18 19:57:40 2004
+++ llvm/include/llvm/Value.h	Fri Jul 30 01:59:15 2004
@@ -136,6 +136,11 @@
     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; }





More information about the llvm-commits mailing list