aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-02-23 02:25:10 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-02-23 02:25:10 +0000
commit5c89c399ba0a171e3312a74e008d61d174d961f3 (patch)
tree44c2b538ae20f0eb8560b2f557475dafd7a13315 /lib/CodeGen
parentd81e961f905e3ea57f6808e5a5686a8324270984 (diff)
Try to handle qualifiers more consistently for array InitListExprs. Fixes <rdar://problem/10907510>, and makes the ASTs a bit more self-consistent.
(I've chosen to keep the qualifiers, but it isn't a strong preference; if anyone prefers removing them, please yell.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151229 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CGExprAgg.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp
index 80d754a98a..6ea21ec47a 100644
--- a/lib/CodeGen/CGExprAgg.cpp
+++ b/lib/CodeGen/CGExprAgg.cpp
@@ -905,10 +905,8 @@ void AggExprEmitter::VisitInitListExpr(InitListExpr *E) {
}
}
- QualType elementType = E->getType().getCanonicalType();
- elementType = CGF.getContext().getQualifiedType(
- cast<ArrayType>(elementType)->getElementType(),
- elementType.getQualifiers() + Dest.getQualifiers());
+ QualType elementType =
+ CGF.getContext().getAsArrayType(E->getType())->getElementType();
llvm::PointerType *APType =
cast<llvm::PointerType>(DestPtr->getType());