aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/trivial-constructor-init.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-11-12 21:38:00 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-11-12 21:38:00 +0000
commit5f9a7e31d038843f1d3a5e2544fc365ffd563951 (patch)
tree45e9647cfe64696b36292ae896b90488f3dd0526 /test/CodeGenCXX/trivial-constructor-init.cpp
parent5af8de8c7255ca4df52cbb0d5e0d28d67c53524c (diff)
Remove abuse of hasTrivial*, and fix miscompile wherein global arrays with
internal linkage, no uses, trivial construction, and nontrivial destruction were not emitted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167756 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/trivial-constructor-init.cpp')
-rw-r--r--test/CodeGenCXX/trivial-constructor-init.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/test/CodeGenCXX/trivial-constructor-init.cpp b/test/CodeGenCXX/trivial-constructor-init.cpp
index 343dc6575a..4922a9ee09 100644
--- a/test/CodeGenCXX/trivial-constructor-init.cpp
+++ b/test/CodeGenCXX/trivial-constructor-init.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -S %s -o %t-64.s
-// RUN: %clang_cc1 -S %s -o %t-32.s
+// RUN: %clang_cc1 -emit-llvm %s -o - -std=c++11 | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -std=c++11 | FileCheck %s
extern "C" int printf(...);
@@ -16,5 +16,20 @@ struct A {
A a;
+struct B {
+ B() = default;
+ B(const B&);
+};
+
+// CHECK-NOT: _ZL1b
+static B b;
+
+struct C {
+ ~C();
+};
+
+// CHECK: _ZL1c
+static C c[4];
+
int main() {
}