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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210079 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- lib/CodeGen/CGExprCXX.cpp 171 additions, 136 deletionslib/CodeGen/CGExprCXX.cpp
- lib/CodeGen/CodeGenFunction.h 2 additions, 1 deletionlib/CodeGen/CodeGenFunction.h
- test/CodeGenCXX/cxx11-initializer-array-new.cpp 70 additions, 17 deletionstest/CodeGenCXX/cxx11-initializer-array-new.cpp
- test/CodeGenCXX/new-array-init.cpp 17 additions, 2 deletionstest/CodeGenCXX/new-array-init.cpp
Loading
Please register or sign in to comment