brintos

brintos / llvm-project-archived public Read only

0
0
Text · 563 B · 10f70ae Raw
23 lines · plain
1// Test that the static function only used in non-inline functions won't get emitted2// into the BMI.3//4// RUN: rm -rf %t5// RUN: mkdir -p %t6//7// RUN: %clang_cc1 -std=c++20 %s -emit-reduced-module-interface -o %t/S.pcm8// RUN: llvm-bcanalyzer --dump --disable-histogram --show-binary-blobs %t/S.pcm > %t/S.dump9// RUN: cat %t/S.dump | FileCheck %s10 11export module S;12static int static_func() {13    return 43;14}15 16export int func() {17    return static_func();18}19 20// CHECK: <DECL_FUNCTION21// Checks that we won't see a second function22// CHECK-NOT: <DECL_FUNCTION23