When emitting a multidimensional array new, emit the initializers for the
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 3 Jun 2014 06:58:52 +0000 (06:58 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 3 Jun 2014 06:58:52 +0000 (06:58 +0000)
commit06a67e2c6faee4645f43e786e292b5eafcb9b70f
treec0c702dd64a90ed2169866ecec654c4d02958670
parente00fec8fe470a800423688b448434f3b2340d038
When emitting a multidimensional array new, emit the initializers for the
trailing elements as a single loop, rather than sometimes emitting a nest of
several loops. This fixes a bug where CodeGen would sometimes try to emit an
expression with the wrong type for the element being initialized. Plus various
other minor cleanups to the IR produced for array new initialization.

llvm-svn: 210079
clang/lib/CodeGen/CGExprCXX.cpp
clang/lib/CodeGen/CodeGenFunction.h
clang/test/CodeGenCXX/cxx11-initializer-array-new.cpp
clang/test/CodeGenCXX/new-array-init.cpp