1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

Rename Value::getValueType to getValueID, to avoid confusion with

other things named getValueType.

llvm-svn: 35964
This commit is contained in:
Dan Gohman 2007-04-13 18:12:09 +00:00
parent 5bb6590218
commit 2d4b1767ab
11 changed files with 33 additions and 33 deletions

View 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;
}
};

View 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

View 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

View 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;
}
};

View 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

View 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;
}
};

View 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;
}
};

View 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;
}
};

View 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;
}
//----------------------------------------------------------------------

View 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) &&

View 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);