diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-26 19:24:09 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-26 19:24:09 +0000 |
| commit | f0c55418e2b09eaab37c820d3756cc1b4584d084 (patch) | |
| tree | 9263bf60f263bb5a7aaa4d2c1be43e5fc4d942e0 /test/CodeGenCXX | |
| parent | 583e75cce441388bc562fa225d23499261a0091e (diff) | |
Notes
Diffstat (limited to 'test/CodeGenCXX')
| -rw-r--r-- | test/CodeGenCXX/invariant.group-for-vptrs.cpp | 23 | ||||
| -rw-r--r-- | test/CodeGenCXX/modules-ts.cppm | 23 | ||||
| -rw-r--r-- | test/CodeGenCXX/ubsan-suppress-checks.cpp | 5 |
3 files changed, 11 insertions, 40 deletions
diff --git a/test/CodeGenCXX/invariant.group-for-vptrs.cpp b/test/CodeGenCXX/invariant.group-for-vptrs.cpp index 5c763538088b..4e5d9b49d985 100644 --- a/test/CodeGenCXX/invariant.group-for-vptrs.cpp +++ b/test/CodeGenCXX/invariant.group-for-vptrs.cpp @@ -12,15 +12,15 @@ struct D : A { void testExternallyVisible() { A *a = new A; - // CHECK: load {{.*}} !invariant.group ![[A_MD:[0-9]+]] + // CHECK: load {{.*}} !invariant.group ![[MD:[0-9]+]] a->foo(); D *d = new D; // CHECK: call void @_ZN1DC1Ev( - // CHECK: load {{.*}} !invariant.group ![[D_MD:[0-9]+]] + // CHECK: load {{.*}} !invariant.group ![[MD]] d->foo(); A *a2 = d; - // CHECK: load {{.*}} !invariant.group ![[A_MD]] + // CHECK: load {{.*}} !invariant.group ![[MD]] a2->foo(); } // CHECK-LABEL: {{^}}} @@ -40,35 +40,32 @@ struct C : B { // CHECK-LABEL: define void @_Z21testInternallyVisibleb( void testInternallyVisible(bool p) { B *b = new B; - // CHECK: = load {{.*}}, !invariant.group ![[B_MD:[0-9]+]] + // CHECK: = load {{.*}}, !invariant.group ![[MD]] b->bar(); // CHECK: call void @_ZN12_GLOBAL__N_11CC1Ev( C *c = new C; - // CHECK: = load {{.*}}, !invariant.group ![[C_MD:[0-9]+]] + // CHECK: = load {{.*}}, !invariant.group ![[MD]] c->bar(); } // Checking A::A() // CHECK-LABEL: define linkonce_odr void @_ZN1AC2Ev( -// CHECK: store {{.*}}, !invariant.group ![[A_MD]] +// CHECK: store {{.*}}, !invariant.group ![[MD]] // CHECK-LABEL: {{^}}} // Checking D::D() // CHECK-LABEL: define linkonce_odr void @_ZN1DC2Ev( // CHECK: = call i8* @llvm.invariant.group.barrier(i8* // CHECK: call void @_ZN1AC2Ev(%struct.A* -// CHECK: store {{.*}} !invariant.group ![[D_MD]] +// CHECK: store {{.*}} !invariant.group ![[MD]] // Checking B::B() // CHECK-LABEL: define internal void @_ZN12_GLOBAL__N_11BC2Ev( -// CHECK: store {{.*}}, !invariant.group ![[B_MD]] +// CHECK: store {{.*}}, !invariant.group ![[MD]] // Checking C::C() // CHECK-LABEL: define internal void @_ZN12_GLOBAL__N_11CC2Ev( -// CHECK: store {{.*}}, !invariant.group ![[C_MD]] +// CHECK: store {{.*}}, !invariant.group ![[MD]] -// CHECK: ![[A_MD]] = !{!"_ZTS1A"} -// CHECK: ![[D_MD]] = !{!"_ZTS1D"} -// CHECK: ![[B_MD]] = distinct !{} -// CHECK: ![[C_MD]] = distinct !{} +// CHECK: ![[MD]] = !{} diff --git a/test/CodeGenCXX/modules-ts.cppm b/test/CodeGenCXX/modules-ts.cppm deleted file mode 100644 index 90f6b5319eb6..000000000000 --- a/test/CodeGenCXX/modules-ts.cppm +++ /dev/null @@ -1,23 +0,0 @@ -// RUN: %clang_cc1 -fmodules-ts -std=c++1z -triple=x86_64-linux-gnu -fmodules-codegen -emit-module-interface %s -o %t.pcm -// RUN: %clang_cc1 -fmodules-ts -std=c++1z -triple=x86_64-linux-gnu %t.pcm -emit-llvm -o - | FileCheck %s - -module FooBar; - -export { - // CHECK-LABEL: define i32 @_Z1fv( - int f() { return 0; } -} - -// CHECK-LABEL: define weak_odr void @_Z2f2v( -inline void f2() { } - -// FIXME: Emit global variables and their initializers with this TU. -// Emit an initialization function that other TUs can call, with guard variable. - -// FIXME: Mangle non-exported symbols so they don't collide with -// non-exported symbols from other modules? - -// FIXME: Formally-internal-linkage symbols that are used from an exported -// symbol need a mangled name and external linkage. - -// FIXME: const-qualified variables don't have implicit internal linkage when owned by a module. diff --git a/test/CodeGenCXX/ubsan-suppress-checks.cpp b/test/CodeGenCXX/ubsan-suppress-checks.cpp index d0e7b32ef96c..ae7c94b34f29 100644 --- a/test/CodeGenCXX/ubsan-suppress-checks.cpp +++ b/test/CodeGenCXX/ubsan-suppress-checks.cpp @@ -12,6 +12,7 @@ void load_non_null_pointers() { char c = "foo"[0]; + // CHECK-NOT: and i64 {{.*}}, !nosanitize // CHECK-NOT: icmp ne {{.*}}, null, !nosanitize // CHECK: ret void } @@ -43,10 +44,6 @@ struct A { }; f(); - // LAMBDA: %[[LAMBDAINT:[0-9]+]] = ptrtoint %class.anon* %[[FUNCVAR:.*]] to i64, !nosanitize - // LAMBDA: and i64 %[[LAMBDAINT]], 7, !nosanitize - // LAMBDA: call void @__ubsan_handle_type_mismatch - // LAMBDA-NOT: call void @__ubsan_handle_type_mismatch // LAMBDA: ret void } |
