Rename Value::getValueType to getValueID, to avoid confusion with
authorDan Gohman <gohman@apple.com>
Fri, 13 Apr 2007 18:12:09 +0000 (18:12 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 13 Apr 2007 18:12:09 +0000 (18:12 +0000)
other things named getValueType.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35964 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Argument.h
include/llvm/BasicBlock.h
include/llvm/Constant.h
include/llvm/Constants.h
include/llvm/Function.h
include/llvm/GlobalValue.h
include/llvm/GlobalVariable.h
include/llvm/InlineAsm.h
include/llvm/Instruction.h
include/llvm/Support/PatternMatch.h
include/llvm/Value.h

index 8776a488aadc36526965b25d348d7eedffa4f410..ea735b546a4490a7ddd0873a91574c5d81193349 100644 (file)
@@ -64,7 +64,7 @@ public:
   ///
   static inline bool classof(const Argument *) { return true; }
   static inline bool classof(const Value *V) {
-    return V->getValueType() == ArgumentVal;
+    return V->getValueID() == ArgumentVal;
   }
 };
 
index e15a894591408305f3e410597b5f328c579e97d1..d8cb5388454082d58194a01583f737f4b7222288 100644 (file)
@@ -158,7 +158,7 @@ public:
   /// Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const BasicBlock *) { return true; }
   static inline bool classof(const Value *V) {
-    return V->getValueType() == Value::BasicBlockVal;
+    return V->getValueID() == Value::BasicBlockVal;
   }
 
   /// dropAllReferences() - This function causes all the subinstructions to "let
index 4b3547ebf8f6b8c9192be0f26d0395429fbe09e6..bfe65a6faa1549278cccd3d71e94c8c04a7041a3 100644 (file)
@@ -88,8 +88,8 @@ public:
   static inline bool classof(const Constant *) { return true; }
   static inline bool classof(const GlobalValue *) { return true; }
   static inline bool classof(const Value *V) {
-    return V->getValueType() >= ConstantFirstVal &&
-           V->getValueType() <= ConstantLastVal;
+    return V->getValueID() >= ConstantFirstVal &&
+           V->getValueID() <= ConstantLastVal;
   }
 
   /// replaceUsesOfWithOnConstant - This method is a special form of
index 0659f3b5133560594ec6b3e1d4f25122a82a27e3..2bec1d42ab63b47c59e640758edb74f780288959 100644 (file)
@@ -201,7 +201,7 @@ public:
   /// @brief Methods to support type inquiry through isa, cast, and dyn_cast.
   static inline bool classof(const ConstantInt *) { return true; }
   static bool classof(const Value *V) {
-    return V->getValueType() == ConstantIntVal;
+    return V->getValueID() == ConstantIntVal;
   }
   static void ResetTrueFalse() { TheTrueVal = TheFalseVal = 0; }
 private:
@@ -239,7 +239,7 @@ public:
   /// Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const ConstantFP *) { return true; }
   static bool classof(const Value *V) {
-    return V->getValueType() == ConstantFPVal;
+    return V->getValueID() == ConstantFPVal;
   }
 };
 
@@ -267,7 +267,7 @@ public:
   ///
   static bool classof(const ConstantAggregateZero *) { return true; }
   static bool classof(const Value *V) {
-    return V->getValueType() == ConstantAggregateZeroVal;
+    return V->getValueID() == ConstantAggregateZeroVal;
   }
 };
 
@@ -331,7 +331,7 @@ public:
   /// Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const ConstantArray *) { return true; }
   static bool classof(const Value *V) {
-    return V->getValueType() == ConstantArrayVal;
+    return V->getValueID() == ConstantArrayVal;
   }
 };
 
@@ -376,7 +376,7 @@ public:
   /// Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const ConstantStruct *) { return true; }
   static bool classof(const Value *V) {
-    return V->getValueType() == ConstantStructVal;
+    return V->getValueID() == ConstantStructVal;
   }
 };
 
@@ -428,7 +428,7 @@ public:
   /// Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const ConstantVector *) { return true; }
   static bool classof(const Value *V) {
-    return V->getValueType() == ConstantVectorVal;
+    return V->getValueID() == ConstantVectorVal;
   }
 };
 
@@ -464,7 +464,7 @@ public:
   /// Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const ConstantPointerNull *) { return true; }
   static bool classof(const Value *V) {
-    return V->getValueType() == ConstantPointerNullVal;
+    return V->getValueID() == ConstantPointerNullVal;
   }
 };
 
@@ -673,7 +673,7 @@ public:
   /// Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const ConstantExpr *) { return true; }
   static inline bool classof(const Value *V) {
-    return V->getValueType() == ConstantExprVal;
+    return V->getValueID() == ConstantExprVal;
   }
 };
 
@@ -704,7 +704,7 @@ public:
   /// Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const UndefValue *) { return true; }
   static bool classof(const Value *V) {
-    return V->getValueType() == UndefValueVal;
+    return V->getValueID() == UndefValueVal;
   }
 };
 
index 101de8ac3c2fa3da13ba10d913c730fc004c1f6a..751d1a3c4bdf87f34015a8603a05aebc986ee7a6 100644 (file)
@@ -220,7 +220,7 @@ public:
   /// Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const Function *) { return true; }
   static inline bool classof(const Value *V) {
-    return V->getValueType() == Value::FunctionVal;
+    return V->getValueID() == Value::FunctionVal;
   }
 
   /// dropAllReferences() - This method causes all the subinstructions to "let
index 576fbe6521ac0d679ef61be898b9caa63dccbae9..72a45f4bc7664c3a0a3124d618003d3865f29034 100644 (file)
@@ -133,8 +133,8 @@ public:
   // Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const GlobalValue *) { return true; }
   static inline bool classof(const Value *V) {
-    return V->getValueType() == Value::FunctionVal ||
-           V->getValueType() == Value::GlobalVariableVal;
+    return V->getValueID() == Value::FunctionVal ||
+           V->getValueID() == Value::GlobalVariableVal;
   }
 };
 
index 6575dde34a802279d405b887b9d57c9d1e67c7ba..ba869b817b0b7aaf7b7817eb80c6ed53fb687c34 100644 (file)
@@ -132,7 +132,7 @@ public:
   // Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const GlobalVariable *) { return true; }
   static inline bool classof(const Value *V) {
-    return V->getValueType() == Value::GlobalVariableVal;
+    return V->getValueID() == Value::GlobalVariableVal;
   }
 };
 
index 98f254f5389649354bc24907558980255183ab91..1ba791c472ed043ab3b95d4839bb8ae5894735f2 100644 (file)
@@ -124,7 +124,7 @@ public:
   // Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const InlineAsm *) { return true; }
   static inline bool classof(const Value *V) {
-    return V->getValueType() == Value::InlineAsmVal;
+    return V->getValueID() == Value::InlineAsmVal;
   }
 };
 
index bda59e97a1c1d88c17a53f3a3ed6ebbae87f4c7f..ed0357f823bf27de4eda5c797b7bef621b3ef9d2 100644 (file)
@@ -110,7 +110,7 @@ public:
   /// Subclass classification... getOpcode() returns a member of
   /// one of the enums that is coming soon (down below)...
   ///
-  unsigned getOpcode() const { return getValueType() - InstructionVal; }
+  unsigned getOpcode() const { return getValueID() - InstructionVal; }
   const char *getOpcodeName() const {
     return getOpcodeName(getOpcode());
   }
@@ -193,7 +193,7 @@ public:
   /// Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const Instruction *) { return true; }
   static inline bool classof(const Value *V) {
-    return V->getValueType() >= Value::InstructionVal;
+    return V->getValueID() >= Value::InstructionVal;
   }
 
   //----------------------------------------------------------------------
index ab9e45f312c0bc9700a820208345c2d0a16cef8c..d8099a9affb00750061b9810fde0b0cdc71d5e4b 100644 (file)
@@ -81,7 +81,7 @@ struct BinaryOp_match {
 
   template<typename OpTy>
   bool match(OpTy *V) {
-    if (V->getValueType() == Value::InstructionVal + Opcode) {
+    if (V->getValueID() == Value::InstructionVal + Opcode) {
       ConcreteTy *I = cast<ConcreteTy>(V);
       return I->getOpcode() == Opcode && L.match(I->getOperand(0)) &&
              R.match(I->getOperand(1));
@@ -195,8 +195,8 @@ struct Shr_match {
 
   template<typename OpTy>
   bool match(OpTy *V) {
-    if (V->getValueType() == Value::InstructionVal + Instruction::LShr ||
-        V->getValueType() == Value::InstructionVal + Instruction::AShr) {
+    if (V->getValueID() == Value::InstructionVal + Instruction::LShr ||
+        V->getValueID() == Value::InstructionVal + Instruction::AShr) {
       ConcreteTy *I = cast<ConcreteTy>(V);
       return (I->getOpcode() == Instruction::AShr ||
               I->getOpcode() == Instruction::LShr) &&
index 3be3c5e7be5cd41970ce16fafa3608b15eb6feb6..fc65e74c56ea06e190ea9e38728d4c3241190f8b 100644 (file)
@@ -178,7 +178,7 @@ public:
     ConstantLastVal  = ConstantPointerNullVal
   };
 
-  /// getValueType - Return an ID for the concrete type of this object.  This is
+  /// getValueID - Return an ID for the concrete type of this object.  This is
   /// used to implement the classof checks.  This should not be used for any
   /// other purpose, as the values may change as LLVM evolves.  Also, note that
   /// for instructions, the Instruction's opcode is added to InstructionVal. So
@@ -187,7 +187,7 @@ public:
   /// # there are more possible values for the value type than in ValueTy enum.
   /// # the InstructionVal enumerator must be the highest valued enumerator in
   ///   the ValueTy enum.
-  unsigned getValueType() const {
+  unsigned getValueID() const {
     return SubclassID;
   }
 
@@ -227,26 +227,26 @@ void Use::set(Value *V) {
 // the subtype header files to test to see if the value is a subclass...
 //
 template <> inline bool isa_impl<Constant, Value>(const Value &Val) {
-  return Val.getValueType() >= Value::ConstantFirstVal &&
-         Val.getValueType() <= Value::ConstantLastVal;
+  return Val.getValueID() >= Value::ConstantFirstVal &&
+         Val.getValueID() <= Value::ConstantLastVal;
 }
 template <> inline bool isa_impl<Argument, Value>(const Value &Val) {
-  return Val.getValueType() == Value::ArgumentVal;
+  return Val.getValueID() == Value::ArgumentVal;
 }
 template <> inline bool isa_impl<InlineAsm, Value>(const Value &Val) {
-  return Val.getValueType() == Value::InlineAsmVal;
+  return Val.getValueID() == Value::InlineAsmVal;
 }
 template <> inline bool isa_impl<Instruction, Value>(const Value &Val) {
-  return Val.getValueType() >= Value::InstructionVal;
+  return Val.getValueID() >= Value::InstructionVal;
 }
 template <> inline bool isa_impl<BasicBlock, Value>(const Value &Val) {
-  return Val.getValueType() == Value::BasicBlockVal;
+  return Val.getValueID() == Value::BasicBlockVal;
 }
 template <> inline bool isa_impl<Function, Value>(const Value &Val) {
-  return Val.getValueType() == Value::FunctionVal;
+  return Val.getValueID() == Value::FunctionVal;
 }
 template <> inline bool isa_impl<GlobalVariable, Value>(const Value &Val) {
-  return Val.getValueType() == Value::GlobalVariableVal;
+  return Val.getValueID() == Value::GlobalVariableVal;
 }
 template <> inline bool isa_impl<GlobalValue, Value>(const Value &Val) {
   return isa<GlobalVariable>(Val) || isa<Function>(Val);