diff options
| author | Marco Antognini <marco.antognini@arm.com> | 2019-07-22 14:47:36 +0000 |
|---|---|---|
| committer | Marco Antognini <marco.antognini@arm.com> | 2019-07-22 14:47:36 +0000 |
| commit | 1b2da771f561affe36eb5eb0c7a3d2862c5a5c1c (patch) | |
| tree | e39ac659319e3cf62c03098f41ed0cbe6615a625 | |
| parent | a3189a032a14d2eca8971c0a154bb9777043d226 (diff) | |
| download | bcm5719-llvm-1b2da771f561affe36eb5eb0c7a3d2862c5a5c1c.tar.gz bcm5719-llvm-1b2da771f561affe36eb5eb0c7a3d2862c5a5c1c.zip | |
[NFC] Relaxed regression tests for PR42665
Following up on the buildbot failures, this commits relaxes some tests:
instead of checking for specific IR output, it now ensures that the
underlying issue (the crash), and only that, doesn't happen.
llvm-svn: 366694
| -rw-r--r-- | clang/test/CodeGenCXX/PR42665.cpp | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/clang/test/CodeGenCXX/PR42665.cpp b/clang/test/CodeGenCXX/PR42665.cpp index 4a460cfa107..99e180171a3 100644 --- a/clang/test/CodeGenCXX/PR42665.cpp +++ b/clang/test/CodeGenCXX/PR42665.cpp @@ -1,7 +1,8 @@ -// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -std=c++17 -O0 %s -o - | FileCheck %s -// RUN: %clang_cc1 -triple %ms_abi_triple -emit-llvm -std=c++17 -O0 %s -o - | FileCheck %s +// RUN: %clang_cc1 -std=c++17 -O0 %s -emit-llvm -o /dev/null -verify -triple %itanium_abi_triple +// RUN: %clang_cc1 -std=c++17 -O0 %s -emit-llvm -o /dev/null -verify -triple %ms_abi_triple // Minimal reproducer for PR42665. +// expected-no-diagnostics struct Foo { Foo() = default; @@ -31,31 +32,3 @@ void foobar() { d(f); // Invoke virtual destructor of Foo through d. } // p's destructor is invoked. -// Regexes are used to handle both kind of mangling. -// -// CHECK-LABEL: define linkonce_odr{{( dso_local)?}} void @{{.*deleter.*Foo.*}}(%struct.Foo* dereferenceable({{[0-9]+}}) -// CHECK-SAME: [[T:%.*]]) -// CHECK: [[T_ADDR:%.*]] = alloca %struct.Foo* -// CHECK: store %struct.Foo* [[T]], %struct.Foo** [[T_ADDR]] -// CHECK: [[R0:%.*]] = load %struct.Foo*, %struct.Foo** [[T_ADDR]] -// CHECK: [[R1:%.*]] = bitcast %struct.Foo* [[R0]] to [[TYPE:.*struct\.Foo.*]]*** -// CHECK: [[VTABLE:%.*]] = load [[TYPE]]**, [[TYPE]]*** [[R1]] -// CHECK: [[VFUN:%.*]] = getelementptr inbounds [[TYPE]]*, [[TYPE]]** [[VTABLE]], i64 0 -// CHECK: [[DTOR:%.*]] = load [[TYPE]]*, [[TYPE]]** [[VFUN]] -// CHECK: call {{(void|i8\*)}} [[DTOR]](%struct.Foo* [[R0]] -// -// CHECK-LABEL: define{{( dso_local)?}} void @{{.*foobar.*}}() -// CHECK: [[P:%.*]] = alloca %struct.Pair -// CHECK: [[F:%.*]] = alloca %struct.Foo* -// CHECK: [[D:%.*]] = alloca [[TYPE:void \(%struct.Foo\*\)]]** -// CHECK: call void @{{.*make_pair.*}}(%struct.Pair* sret [[P]]) -// CHECK: [[FIRST:%.*]] = getelementptr inbounds %struct.Pair, %struct.Pair* [[P]], i32 0, i32 0 -// CHECK: store %struct.Foo* [[FIRST]], %struct.Foo** [[F]] -// CHECK: [[SECOND:%.*]] = getelementptr inbounds %struct.Pair, %struct.Pair* [[P]], i32 0, i32 1 -// CHECK: store void (%struct.Foo*)** [[SECOND]], [[TYPE]]*** [[D]] -// CHECK: [[R0:%.*]] = load [[TYPE]]**, [[TYPE]]*** [[D]] -// CHECK: [[R1:%.*]] = load [[TYPE]]*, [[TYPE]]** [[R0]] -// CHECK: [[R2:%.*]] = load %struct.Foo*, %struct.Foo** [[F]] -// CHECK: call void [[R1]](%struct.Foo* dereferenceable({{[0-9]+}}) [[R2]]) -// CHECK: call void @{{.*Pair.*Foo.*}}(%struct.Pair* [[P]]) - |

