Don't build an aggregate constructor loop when the constructor is trivial.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102912 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/new.cpp b/test/CodeGenCXX/new.cpp
index cc62885..885158f 100644
--- a/test/CodeGenCXX/new.cpp
+++ b/test/CodeGenCXX/new.cpp
@@ -96,3 +96,13 @@
   // CHECK: call void @llvm.memset.p0i8.i64(
   B* b = new B();
 }
+
+struct Empty { };
+
+// We don't need to initialize an empty class.
+void t12() {
+  // CHECK: define void @_Z3t12v
+  // CHECK-NOT: br label
+  // CHECK: ret void
+  (void)new Empty[10];
+}