From: Dan Gohman Date: Mon, 8 Dec 2008 07:10:54 +0000 (+0000) Subject: Make ConstantAggregateZero::get return a ConstantAggregateZero*, X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=149cfc35197229d229c5737046210b5ade06e557;p=oota-llvm.git 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 --- diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h index 0706f61d12e..28ebe556cde 100644 --- a/include/llvm/Constants.h +++ b/include/llvm/Constants.h @@ -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. diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index 55b87009cba..5fc08dc900e 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -1268,7 +1268,7 @@ static ManagedStatic(Ty) || isa(Ty) || isa(Ty)) && "Cannot create an aggregate zero of non-aggregate type!"); return AggZeroConstants->getOrCreate(Ty, 0);