[llvm-commits] CVS: llvm/include/llvm/User.h Instruction.h

Chris Lattner lattner at cs.uiuc.edu
Sat Jun 26 15:53:01 PDT 2004


Changes in directory llvm/include/llvm:

User.h updated: 1.28 -> 1.29
Instruction.h updated: 1.57 -> 1.58

---
Log message:

Consider anything with a ValueType that is >= Instruction to be an instruction


---
Diffs of the changes:  (+3 -4)

Index: llvm/include/llvm/User.h
diff -u llvm/include/llvm/User.h:1.28 llvm/include/llvm/User.h:1.29
--- llvm/include/llvm/User.h:1.28	Sun Nov 16 14:21:15 2003
+++ llvm/include/llvm/User.h	Sat Jun 26 15:51:50 2004
@@ -86,9 +86,8 @@
   // 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);
   }
 };
 


Index: llvm/include/llvm/Instruction.h
diff -u llvm/include/llvm/Instruction.h:1.57 llvm/include/llvm/Instruction.h:1.58
--- llvm/include/llvm/Instruction.h:1.57	Thu Jun 10 22:06:43 2004
+++ llvm/include/llvm/Instruction.h	Sat Jun 26 15:51:50 2004
@@ -138,7 +138,7 @@
   /// Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const Instruction *I) { return true; }
   static inline bool classof(const Value *V) {
-    return V->getValueType() == Value::InstructionVal;
+    return V->getValueType() >= Value::InstructionVal;
   }
   
   //----------------------------------------------------------------------





More information about the llvm-commits mailing list