summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGAtomic.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2019-10-04 01:25:59 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2019-10-04 01:25:59 +0000
commit772e266fbff40a566c9ef2d805c057c4692ac028 (patch)
treebebf8ee548a80c1fdfd94c55b752d35bb752a2f8 /clang/lib/CodeGen/CGAtomic.cpp
parent053391fa8637bcb77dd06dc9090b1f2271d0e22f (diff)
downloadbcm5719-llvm-772e266fbff40a566c9ef2d805c057c4692ac028.tar.gz
bcm5719-llvm-772e266fbff40a566c9ef2d805c057c4692ac028.zip
Properly handle instantiation-dependent array bounds.
We previously failed to treat an array with an instantiation-dependent but not value-dependent bound as being an instantiation-dependent type. We now track the array bound expression as part of a constant array type if it's an instantiation-dependent expression. llvm-svn: 373685
Diffstat (limited to 'clang/lib/CodeGen/CGAtomic.cpp')
-rw-r--r--clang/lib/CodeGen/CGAtomic.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGAtomic.cpp b/clang/lib/CodeGen/CGAtomic.cpp
index f9915a1a8f5..afddfb76605 100644
--- a/clang/lib/CodeGen/CGAtomic.cpp
+++ b/clang/lib/CodeGen/CGAtomic.cpp
@@ -102,8 +102,9 @@ namespace {
llvm::APInt Size(
/*numBits=*/32,
C.toCharUnitsFromBits(AtomicSizeInBits).getQuantity());
- AtomicTy = C.getConstantArrayType(C.CharTy, Size, ArrayType::Normal,
- /*IndexTypeQuals=*/0);
+ AtomicTy =
+ C.getConstantArrayType(C.CharTy, Size, nullptr, ArrayType::Normal,
+ /*IndexTypeQuals=*/0);
}
AtomicAlign = ValueAlign = lvalue.getAlignment();
} else if (lvalue.isVectorElt()) {
OpenPOWER on IntegriCloud