brintos

brintos / llvm-project-archived public Read only

0
0
Text · 933 B · 41ae2bf Raw
34 lines · plain
1// Test that we won't record local declarations by default in reduced BMI.2 3// RUN: rm -rf %t4// RUN: split-file %s %t5// RUN: cd %t6//7// RUN: %clang_cc1 -std=c++20 %t/a.cppm -emit-reduced-module-interface -o %t/a.pcm8// RUN: llvm-bcanalyzer --dump --disable-histogram --show-binary-blobs %t/a.pcm > %t/a.dump9// RUN: cat %t/a.dump | FileCheck %t/a.cppm10//11// RUN: %clang_cc1 -std=c++20 %t/b.cppm -emit-reduced-module-interface -o %t/b.pcm12// RUN: llvm-bcanalyzer --dump --disable-histogram --show-binary-blobs %t/b.pcm > %t/b.dump13// RUN: cat %t/b.dump | FileCheck %t/b.cppm14 15//--- a.cppm16export module a;17export int func() {18    int v = 43;19    return 43;20}21 22// Test that the variable declaration is not recorded completely.23// CHECK-NOT: <DECL_VAR24 25//--- b.cppm26export module b;27export inline int func() {28    int v = 43;29    return v;30}31 32// Check that we still records the declaration from inline functions.33// CHECK: <DECL_VAR34