diff options
author | Chris Lattner <sabre@nondot.org> | 2012-01-24 14:17:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2012-01-24 14:17:05 +0000 |
commit | 29cc6cb4d1aa22f0a27edf4e5b363071a83a65d8 (patch) | |
tree | 75dfab2a48716105544899e8ebb3f6f34687019d /lib/VMCore/Constants.cpp | |
parent | 32100602432657b188db603ca3ab50b487938027 (diff) |
C++, CBE, and TLOF support for ConstantDataSequential
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148805 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Constants.cpp')
-rw-r--r-- | lib/VMCore/Constants.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index 5151105e05..1976832294 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -2048,7 +2048,8 @@ static bool isAllZeros(StringRef Arr) { /// we *want* an underlying "char*" to avoid TBAA type punning violations. Constant *ConstantDataSequential::getImpl(StringRef Elements, Type *Ty) { assert(isElementTypeCompatible(cast<SequentialType>(Ty)->getElementType())); - // If the elements are all zero, return a CAZ, which is more dense. + // If the elements are all zero or there are no elements, return a CAZ, which + // is more dense and canonical. if (isAllZeros(Elements)) return ConstantAggregateZero::get(Ty); |