aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-12-08 07:10:54 +0000
committerDan Gohman <gohman@apple.com>2008-12-08 07:10:54 +0000
commit149cfc35197229d229c5737046210b5ade06e557 (patch)
tree8267084d313e44ec7dcf00e92eddec26cfc010dd
parentf923129fc30a8a2c2c0948131dd6458af4ae10ee (diff)
downloadexternal_llvm-149cfc35197229d229c5737046210b5ade06e557.zip
external_llvm-149cfc35197229d229c5737046210b5ade06e557.tar.gz
external_llvm-149cfc35197229d229c5737046210b5ade06e557.tar.bz2
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
-rw-r--r--include/llvm/Constants.h2
-rw-r--r--lib/VMCore/Constants.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h
index 0706f61..28ebe55 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 55b8700..5fc08dc 100644
--- a/lib/VMCore/Constants.cpp
+++ b/lib/VMCore/Constants.cpp
@@ -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);