| 1 |
// Test that the static function only used in non-inline functions won't get emitted |
| 2 |
// into the BMI. |
| 3 |
// |
| 4 |
// RUN: rm -rf %t |
| 5 |
// RUN: mkdir -p %t |
| 6 |
// |
| 7 |
// RUN: %clang_cc1 -std=c++20 %s -emit-reduced-module-interface -o %t/S.pcm |
| 8 |
// RUN: llvm-bcanalyzer --dump --disable-histogram --show-binary-blobs %t/S.pcm > %t/S.dump |
| 9 |
// RUN: cat %t/S.dump | FileCheck %s |
| 10 |
|
| 11 |
export module S; |
| 12 |
static int static_func() { |
| 13 |
return 43; |
| 14 |
} |
| 15 |
|
| 16 |
export int func() { |
| 17 |
return static_func(); |
| 18 |
} |
| 19 |
|
| 20 |
// CHECK: <DECL_FUNCTION |
| 21 |
// Checks that we won't see a second function |
| 22 |
// CHECK-NOT: <DECL_FUNCTION |