mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Extend struct and array constants to support isNullValue
llvm-svn: 5719
This commit is contained in:
parent
90932ffc26
commit
07a7a75331
@ -289,7 +289,14 @@ public:
|
||||
|
||||
/// isNullValue - Return true if this is the value that would be returned by
|
||||
/// getNullValue.
|
||||
virtual bool isNullValue() const { return false; }
|
||||
virtual bool isNullValue() const {
|
||||
// FIXME: This should be made to be MUCH faster. Just check against well
|
||||
// known null value!
|
||||
for (unsigned i = 0, e = getNumOperands(); i != e; ++i)
|
||||
if (!cast<Constant>(getOperand(i))->isNullValue())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void destroyConstant();
|
||||
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To);
|
||||
@ -328,7 +335,14 @@ public:
|
||||
|
||||
/// isNullValue - Return true if this is the value that would be returned by
|
||||
/// getNullValue.
|
||||
virtual bool isNullValue() const { return false; }
|
||||
virtual bool isNullValue() const {
|
||||
// FIXME: This should be made to be MUCH faster. Just check against well
|
||||
// known null value!
|
||||
for (unsigned i = 0, e = getNumOperands(); i != e; ++i)
|
||||
if (!cast<Constant>(getOperand(i))->isNullValue())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void destroyConstant();
|
||||
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To);
|
||||
|
Loading…
Reference in New Issue
Block a user