brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 4923dba Raw
47 lines · plain
1// RUN: rm -rf %t2// RUN: split-file %s %t3// RUN: cd %t4//5// RUN: %clang_cc1 -std=c++20 -O1 -triple %itanium_abi_triple %t/a.cppm \6// RUN:     -emit-module-interface -o %t/a.pcm7// RUN: %clang_cc1 -std=c++20 -O1 -triple %itanium_abi_triple %t/b.cppm \8// RUN:     -emit-module-interface -fprebuilt-module-path=%t -o %t/b.pcm9// RUN: %clang_cc1 -std=c++20 -O1 -triple %itanium_abi_triple %t/c.cppm \10// RUN:     -emit-module-interface -fprebuilt-module-path=%t -o %t/c.pcm11// RUN: %clang_cc1 -std=c++20 -O1 -triple %itanium_abi_triple %t/c.pcm \12// RUN:     -fprebuilt-module-path=%t -emit-llvm -disable-llvm-passes -o - \13// RUN:     | FileCheck %t/c.cppm14 15//--- a.cppm16export module a;17export int a() {18    return 43;19}20export __attribute__((noinline)) int a_noinline() {21    return 44;22}23 24//--- b.cppm25export module b;26export import a;27export int b() {28    return 43 + a();29}30 31export __attribute__((noinline)) int b_noinline() {32    return 43 + a();33}34 35//--- c.cppm36export module c;37export import b;38export int c() {39    return 43 + b() + a() + b_noinline() + a_noinline();40}41 42// CHECK: declare{{.*}}@_ZW1b1bv(43// CHECK: declare{{.*}}@_ZW1a1av(44 45// CHECK: declare{{.*}}@_ZW1b10b_noinlinev()46// CHECK: declare{{.*}}@_ZW1a10a_noinlinev()47