summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2007-04-13 18:12:09 +0000
committerDan Gohman <gohman@apple.com>2007-04-13 18:12:09 +0000
commita1a702cdd23221e6e3f36632be91150138958e9d (patch)
treedb45bd3350280f315b292069ebe826d568cc3b3f /include
parent8085bcfdca515a359c746ea475a3b8e9cac1c077 (diff)
downloadllvm-a1a702cdd23221e6e3f36632be91150138958e9d.tar.gz
llvm-a1a702cdd23221e6e3f36632be91150138958e9d.tar.bz2
llvm-a1a702cdd23221e6e3f36632be91150138958e9d.tar.xz
Rename Value::getValueType to getValueID, to avoid confusion with
other things named getValueType. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35964 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Argument.h2
-rw-r--r--include/llvm/BasicBlock.h2
-rw-r--r--include/llvm/Constant.h4
-rw-r--r--include/llvm/Constants.h18
-rw-r--r--include/llvm/Function.h2
-rw-r--r--include/llvm/GlobalValue.h4
-rw-r--r--include/llvm/GlobalVariable.h2
-rw-r--r--include/llvm/InlineAsm.h2
-rw-r--r--include/llvm/Instruction.h4
-rw-r--r--include/llvm/Support/PatternMatch.h6
-rw-r--r--include/llvm/Value.h20
11 files changed, 33 insertions, 33 deletions
diff --git a/include/llvm/Argument.h b/include/llvm/Argument.h
index 8776a488aa..ea735b546a 100644
--- a/include/llvm/Argument.h
+++ b/include/llvm/Argument.h
@@ -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;
}
};
diff --git a/include/llvm/BasicBlock.h b/include/llvm/BasicBlock.h
index e15a894591..d8cb538845 100644
--- a/include/llvm/BasicBlock.h
+++ b/include/llvm/BasicBlock.h
@@ -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
diff --git a/include/llvm/Constant.h b/include/llvm/Constant.h
index 4b3547ebf8..bfe65a6faa 100644
--- a/include/llvm/Constant.h
+++ b/include/llvm/Constant.h
@@ -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
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h
index 0659f3b513..2bec1d42ab 100644
--- a/include/llvm/Constants.h
+++ b/include/llvm/Constants.h
@@ -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;
}
};
diff --git a/include/llvm/Function.h b/include/llvm/Function.h
index 101de8ac3c..751d1a3c4b 100644
--- a/include/llvm/Function.h
+++ b/include/llvm/Function.h
@@ -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
diff --git a/include/llvm/GlobalValue.h b/include/llvm/GlobalValue.h
index 576fbe6521..72a45f4bc7 100644
--- a/include/llvm/GlobalValue.h
+++ b/include/llvm/GlobalValue.h
@@ -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;
}
};
diff --git a/include/llvm/GlobalVariable.h b/include/llvm/GlobalVariable.h
index 6575dde34a..ba869b817b 100644
--- a/include/llvm/GlobalVariable.h
+++ b/include/llvm/GlobalVariable.h
@@ -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;
}
};
diff --git a/include/llvm/InlineAsm.h b/include/llvm/InlineAsm.h
index 98f254f538..1ba791c472 100644
--- a/include/llvm/InlineAsm.h
+++ b/include/llvm/InlineAsm.h
@@ -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;
}
};
diff --git a/include/llvm/Instruction.h b/include/llvm/Instruction.h
index bda59e97a1..ed0357f823 100644
--- a/include/llvm/Instruction.h
+++ b/include/llvm/Instruction.h
@@ -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;
}
//----------------------------------------------------------------------
diff --git a/include/llvm/Support/PatternMatch.h b/include/llvm/Support/PatternMatch.h
index ab9e45f312..d8099a9aff 100644
--- a/include/llvm/Support/PatternMatch.h
+++ b/include/llvm/Support/PatternMatch.h
@@ -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) &&
diff --git a/include/llvm/Value.h b/include/llvm/Value.h
index 3be3c5e7be..fc65e74c56 100644
--- a/include/llvm/Value.h
+++ b/include/llvm/Value.h
@@ -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);