diff options
Diffstat (limited to 'clang/test/CodeGenCXX/thunks.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/thunks.cpp | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/clang/test/CodeGenCXX/thunks.cpp b/clang/test/CodeGenCXX/thunks.cpp index 38afb9d0dbf..3a598b90afe 100644 --- a/clang/test/CodeGenCXX/thunks.cpp +++ b/clang/test/CodeGenCXX/thunks.cpp @@ -1,5 +1,9 @@ -// RUN: %clang_cc1 %s -triple=x86_64-pc-linux-gnu -munwind-tables -emit-llvm -o - | FileCheck %s -// RUN: %clang_cc1 %s -triple=x86_64-pc-linux-gnu -munwind-tables -emit-llvm -o - -O1 -disable-llvm-optzns | FileCheck %s +// RUN: %clang_cc1 %s -triple=x86_64-pc-linux-gnu -munwind-tables -emit-llvm -o %t +// RUN: %clang_cc1 %s -triple=x86_64-pc-linux-gnu -munwind-tables -emit-llvm -o %t.opt -O1 -disable-llvm-optzns +// RUN: FileCheck %s < %t +// RUN: FileCheck %s < %t.opt +// RUN: FileCheck --check-prefix=CHECK-NONOPT %s < %t +// RUN: FileCheck --check-prefix=CHECK-OPT %s < %t.opt namespace Test1 { @@ -380,13 +384,25 @@ D::~D() {} /**** The following has to go at the end of the file ****/ +// checking without opt +// CHECK-NONOPT-LABEL: define internal void @_ZThn8_N6Test4B12_GLOBAL__N_11C1fEv( +// CHECK-NONOPT-NOT: comdat + +// This is from Test5: +// CHECK-NONOPT-LABEL: define linkonce_odr void @_ZTv0_n24_N5Test51B1fEv + +// This is from Test10: +// CHECK-NONOPT-LABEL: define linkonce_odr void @_ZN6Test101C3fooEv +// CHECK-NONOPT-LABEL: define linkonce_odr void @_ZThn8_N6Test101C3fooEv + +// Checking with opt +// CHECK-OPT-LABEL: define internal void @_ZThn8_N6Test4B12_GLOBAL__N_11C1fEv(%"struct.Test4B::(anonymous namespace)::C"* %this) unnamed_addr #0 align 2 + // This is from Test5: -// CHECK-LABEL: define internal void @_ZThn8_N6Test4B12_GLOBAL__N_11C1fEv( -// CHECK-NOT: comdat -// CHECK-LABEL: define linkonce_odr void @_ZTv0_n24_N5Test51B1fEv +// CHECK-OPT-LABEL: define linkonce_odr void @_ZTv0_n24_N5Test51B1fEv // This is from Test10: -// CHECK-LABEL: define linkonce_odr void @_ZN6Test101C3fooEv -// CHECK-LABEL: define linkonce_odr void @_ZThn8_N6Test101C3fooEv +// CHECK-OPT-LABEL: define linkonce_odr void @_ZN6Test101C3fooEv +// CHECK-OPT-LABEL: define linkonce_odr void @_ZThn8_N6Test101C3fooEv // CHECK: attributes [[NUW]] = { nounwind uwtable{{.*}} } |