summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
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
commit4c6568869e8a362f544d1c7996fe7be2c738a64b (patch)
treea161568c57e85266303d1f01e863db82dab5db70 /clang/lib/CodeGen
parenta3c78f59814f90a06994f720d75ecbae2612c4c3 (diff)
downloadbcm5719-llvm-4c6568869e8a362f544d1c7996fe7be2c738a64b.tar.gz
bcm5719-llvm-4c6568869e8a362f544d1c7996fe7be2c738a64b.zip
Fix typo causing assert in self-host.
llvm-svn: 337508
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGExprConstant.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp
index afe2bfe8e9b..cfd0b859233 100644
--- a/clang/lib/CodeGen/CGExprConstant.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud