[AMDGPU][AsmParser][NFC] Get rid of custom default operand handlers.
[llvm-project.git] / clang / test / InterfaceStubs / class-template-specialization.cpp
blob34576546571d4157cae9c955591a5169a528be35
1 // REQUIRES: x86-registered-target
2 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -o - -emit-interface-stubs %s | \
3 // RUN: FileCheck -check-prefix=CHECK-TAPI %s
5 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -o - -emit-interface-stubs %s | \
6 // RUN: FileCheck -check-prefix=CHECK-TAPI2 %s
8 // RUN: %clang -target x86_64-unknown-linux-gnu -c -o - %s | llvm-readelf -s - 2>&1 | \
9 // RUN: FileCheck -check-prefix=CHECK-SYMBOLS %s
11 // For the following:
12 // g()
13 // n::S<int>::S()
14 // n::S<int>::~S()
15 // n::S<int>::func() const
16 // n::S<int>::S(n::S<int> const&)
18 // We expect these manglings:
19 // CHECK-TAPI: Symbols:
20 // CHECK-TAPI-NOT: _ZNK1n1SIiEclEv
21 // CHECK-TAPI2: Symbols:
22 // CHECK-TAPI2: _Z1g
24 // CHECK-SYMBOLS-DAG: FUNC GLOBAL DEFAULT {{[0-9]}} _Z1g
25 // CHECK-SYMBOLS-DAG: FUNC WEAK HIDDEN {{[0-9]}} _ZNK1n1SIiEclEv
27 namespace n {
28 template <typename T>
29 struct __attribute__((__visibility__("default"))) S {
30 S() = default;
31 ~S() = default;
32 int __attribute__((__visibility__(("default")))) func() const {
33 return 1844;
35 int __attribute__((__visibility__(("hidden")))) operator()() const {
36 return 1863;
39 } // namespace n
41 void g() { n::S<int>()(); }