summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprConstant.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2018-07-19 23:24:41 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2018-07-19 23:24:41 +0000
commit02e5d2661dfbdc64039d7cd01900efad5137b85f (patch)
tree366cb6b56597ee1d94e415a65128ca446f4da9a0 /lib/CodeGen/CGExprConstant.cpp
parentb89b5e148bb4bdccf2a10d6a77afc9d5a2fa376c (diff)
downloadclang-02e5d2661dfbdc64039d7cd01900efad5137b85f.tar.gz
Fix typo causing assert in self-host.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337508 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
-rw-r--r--lib/CodeGen/CGExprConstant.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index afe2bfe8e9..cfd0b85923 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/lib/CodeGen/CGExprConstant.cpp
@@ -664,7 +664,7 @@ EmitArrayConstant(CodeGenModule &CGM, const ConstantArrayType *DestType,
// struct of two arrays (the nonzero data and the zeroinitializer).
if (CommonElementType && NonzeroLength >= 8) {
llvm::Constant *Initial = llvm::ConstantArray::get(
- llvm::ArrayType::get(CommonElementType, ArrayBound),
+ llvm::ArrayType::get(CommonElementType, NonzeroLength),
makeArrayRef(Elements).take_front(NonzeroLength));
Elements.resize(2);
Elements[0] = Initial;