xref: /llvm-project/clang/test/Modules/static-initializer.cppm (revision 259eaa6878ead1e2e7ef572a874dc3d885c1899b)
1// RUN: rm -rf %t
2// RUN: mkdir -p %t
3// RUN: split-file %s %t
4//
5// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 %t/a.cppm -emit-module-interface -o %t/a.pcm
6// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 %t/a.cpp -fmodule-file=a=%t/a.pcm -emit-llvm -o - | FileCheck %t/a.cpp
7
8//--- a.cppm
9export module a;
10int func();
11static int a = func();
12
13//--- a.cpp
14import a;
15
16// CHECK-NOT: internal global
17// CHECK-NOT: __cxx_global_var_init
18
19