1 // UNSUPPORTED: target={{.*}}-zos{{.*}}, target={{.*}}-aix{{.*}}
3 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -std=c++11 -fmodules-cache-path=%t -I %S/Inputs -triple %itanium_abi_triple -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s
4 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -std=c++11 -fmodules-cache-path=%t -I %S/Inputs -triple %itanium_abi_triple -disable-llvm-passes -emit-llvm -debug-info-kind=limited -o - %s | FileCheck %s
5 // FIXME: When we have a syntax for modules in C++, use that.
11 @import cxx_irgen_left
;
12 @import cxx_irgen_right
;
14 // Keep these two namespace definitions separate; merging them hides the bug.
15 namespace EmitInlineMethods
{
16 // CHECK-DAG: define linkonce_odr {{(dso_local )?}}[[CC:([0-9_a-z]*cc[ ]+)?]]void @_ZN17EmitInlineMethods1C1fEPNS_1AE(
17 // CHECK-DAG: declare {{(dso_local )?}}[[CC]]void @_ZN17EmitInlineMethods1A1gEv(
19 __attribute__((used
)) void f(A
*p
) { p
->g(); }
22 namespace EmitInlineMethods
{
23 // CHECK-DAG: define linkonce_odr {{(dso_local )?}}[[CC]]void @_ZN17EmitInlineMethods1D1fEPNS_1BE(
24 // CHECK-DAG: define linkonce_odr {{(dso_local )?}}[[CC]]void @_ZN17EmitInlineMethods1B1gEv(
26 __attribute__((used
)) void f(B
*p
) { p
->g(); }
30 // CHECK-DAG: define available_externally hidden {{.*}}{{signext i32|i32}} @_ZN1SIiE1gEv({{.*}} #[[#ALWAYS_INLINE:]]
35 // CHECK-DAG: define linkonce_odr {{.*}}{{signext i32|i32}} @_Z3minIiET_S0_S0_(i32
37 // CHECK: define available_externally {{.*}}{{signext i32|i32}} @_ZN1SIiE1fEv({{.*}} #[[#ALWAYS_INLINE]]
39 namespace ImplicitSpecialMembers
{
40 // CHECK-LABEL: define {{.*}} @_ZN22ImplicitSpecialMembers1BC2ERKS0_(
41 // CHECK: call {{.*}} @_ZN22ImplicitSpecialMembers1AC1ERKS0_(
42 // CHECK-LABEL: define {{.*}} @_ZN22ImplicitSpecialMembers1BC2EOS0_(
43 // CHECK: call {{.*}} @_ZN22ImplicitSpecialMembers1AC1ERKS0_(
44 // CHECK-LABEL: define {{.*}} @_ZN22ImplicitSpecialMembers1CC2ERKS0_(
45 // CHECK: call {{.*}} @_ZN22ImplicitSpecialMembers1AC1ERKS0_(
46 // CHECK-LABEL: define {{.*}} @_ZN22ImplicitSpecialMembers1CC2EOS0_(
47 // CHECK: call {{.*}} @_ZN22ImplicitSpecialMembers1AC1ERKS0_(
48 // CHECK-LABEL: define {{.*}} @_ZN22ImplicitSpecialMembers1DC2ERKS0_(
49 // CHECK: call {{.*}} @_ZN22ImplicitSpecialMembers1AC1ERKS0_(
50 // CHECK-LABEL: define {{.*}} @_ZN22ImplicitSpecialMembers1DC2EOS0_(
51 // CHECK: call {{.*}} @_ZN22ImplicitSpecialMembers1AC1ERKS0_(
52 // CHECK-LABEL: define {{.*}} @_ZN20OperatorDeleteLookup1AD0Ev(
53 // CHECK: call {{.*}}void @_ZN20OperatorDeleteLookup1AdlEPv(
55 // CHECK-DAG: call {{.*}}i32 @_ZN8CtorInitIiE1fEv(
59 B
b3(static_cast<B
&&>(b1
));
63 C
c3(static_cast<C
&&>(c1
));
67 D
d3(static_cast<D
&&>(d1
));
70 namespace OperatorDeleteLookup
{
71 // Trigger emission of B's vtable and deleting dtor.
72 // This requires us to know what operator delete was selected.
77 // CHECK: attributes #[[#ALWAYS_INLINE]] = {{.*}} alwaysinline