summaryrefslogtreecommitdiff
path: root/include/llvm/Value.h
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-07-17 23:34:47 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-07-17 23:34:47 +0000
commit1488b34be5f30c056513cdfd4576053af92b68a0 (patch)
tree5efd99124004d6d64e48abd77e3d2a3cd0fcf29c /include/llvm/Value.h
parente3d19aac69bace9eda1620acf5ecfa6c07efd4a6 (diff)
downloadllvm-1488b34be5f30c056513cdfd4576053af92b68a0.tar.gz
llvm-1488b34be5f30c056513cdfd4576053af92b68a0.tar.bz2
llvm-1488b34be5f30c056513cdfd4576053af92b68a0.tar.xz
bug 122:
- 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14925 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Value.h')
-rw-r--r--include/llvm/Value.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/Value.h b/include/llvm/Value.h
index ee5f56b167..1fe6902d8e 100644
--- a/include/llvm/Value.h
+++ b/include/llvm/Value.h
@@ -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;