[llvm-commits] [llvm] r60691 - in /llvm/trunk: include/llvm/Constants.h lib/VMCore/Constants.cpp
Dan Gohman
gohman at apple.com
Sun Dec 7 23:10:54 PST 2008
Author: djg
Date: Mon Dec 8 01:10:54 2008
New Revision: 60691
URL: http://llvm.org/viewvc/llvm-project?rev=60691&view=rev
Log:
Make ConstantAggregateZero::get return a ConstantAggregateZero*,
as suggested in PR3182.
Modified:
llvm/trunk/include/llvm/Constants.h
llvm/trunk/lib/VMCore/Constants.cpp
Modified: llvm/trunk/include/llvm/Constants.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constants.h?rev=60691&r1=60690&r2=60691&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Constants.h (original)
+++ llvm/trunk/include/llvm/Constants.h Mon Dec 8 01:10:54 2008
@@ -295,7 +295,7 @@
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.
Modified: llvm/trunk/lib/VMCore/Constants.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Constants.cpp?rev=60691&r1=60690&r2=60691&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Constants.cpp (original)
+++ llvm/trunk/lib/VMCore/Constants.cpp Mon Dec 8 01:10:54 2008
@@ -1268,7 +1268,7 @@
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);
More information about the llvm-commits
mailing list