Make ConstantAggregateZero::get return a ConstantAggregateZero*,

as suggested in PR3182.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60691 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2008-12-08 07:10:54 +00:00
parent f923129fc3
commit 149cfc3519
2 changed files with 2 additions and 2 deletions

View File

@ -295,7 +295,7 @@ protected:
public:
/// get() - static factory method for creating a null aggregate. It is
/// illegal to call this method with a non-aggregate type.
static Constant *get(const Type *Ty);
static ConstantAggregateZero *get(const Type *Ty);
/// isNullValue - Return true if this is the value that would be returned by
/// getNullValue.

View File

@ -1268,7 +1268,7 @@ static ManagedStatic<ValueMap<char, Type,
static char getValType(ConstantAggregateZero *CPZ) { return 0; }
Constant *ConstantAggregateZero::get(const Type *Ty) {
ConstantAggregateZero *ConstantAggregateZero::get(const Type *Ty) {
assert((isa<StructType>(Ty) || isa<ArrayType>(Ty) || isa<VectorType>(Ty)) &&
"Cannot create an aggregate zero of non-aggregate type!");
return AggZeroConstants->getOrCreate(Ty, 0);