summaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/no-lto-unit.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-04-16 16:02:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-04-16 16:02:28 +0000
commit7442d6faa2719e4e7d33a7021c406c5a4facd74d (patch)
treec72b9241553fc9966179aba84f90f17bfa9235c3 /test/CodeGenCXX/no-lto-unit.cpp
parentb52119637f743680a99710ce5fdb6646da2772af (diff)
Notes
Diffstat (limited to 'test/CodeGenCXX/no-lto-unit.cpp')
-rw-r--r--test/CodeGenCXX/no-lto-unit.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGenCXX/no-lto-unit.cpp b/test/CodeGenCXX/no-lto-unit.cpp
new file mode 100644
index 000000000000..24b8fd01546a
--- /dev/null
+++ b/test/CodeGenCXX/no-lto-unit.cpp
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -flto=thin -triple x86_64-unknown-linux -fvisibility hidden -emit-llvm-bc -o %t %s
+// RUN: llvm-dis -o - %t | FileCheck %s
+// RUN: %clang_cc1 -flto=thin -flto-unit -fno-lto-unit -triple x86_64-unknown-linux -fvisibility hidden -emit-llvm-bc -o %t %s
+// RUN: llvm-dis -o - %t | FileCheck %s
+
+// CHECK-NOT: !type
+class A {
+ virtual void f() {}
+};
+
+A *f() {
+ return new A;
+}