1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
- Add ValueListTy to TypeTy so that the bcreader can have its own User
  category that won't get factored into any optimizations or cleanup.
- Correct an isa_impl to correctly include GlobalValue now that it isa
  Constant.

llvm-svn: 14925
This commit is contained in:
Reid Spencer 2004-07-17 23:34:47 +00:00
parent b0ee45b970
commit fe177d219a

View File

@ -128,6 +128,7 @@ public:
GlobalVariableVal, // This is an instance of GlobalVariable
ConstantVal, // This is an instance of Constant
InstructionVal, // This is an instance of Instruction
ValueListVal // This is for bcreader, a special ValTy
};
unsigned getValueType() const {
return SubclassID;
@ -177,7 +178,9 @@ 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::ConstantVal;
return Val.getValueType() == Value::ConstantVal ||
Val.getValueType() == Value::FunctionVal ||
Val.getValueType() == Value::GlobalVariableVal;
}
template <> inline bool isa_impl<Argument, Value>(const Value &Val) {
return Val.getValueType() == Value::ArgumentVal;