<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/92347>92347</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            `export inline` not initialize before static block
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          RichardLuo0
      </td>
    </tr>
</table>

<pre>
    Step to reproduce:
1. clone https://github.com/RichardLuo0/clang-export-inline
2. `clang++ -std=c++20 -fprebuilt-module-path=<path to std> hello.cppm --precompile -o Hello.pcm`
3. `clang++ -std=c++20 -fprebuilt-module-path=<path to std> -fmodule-file=Hello=Hello.pcm .\main.cpp libc++std.a .\Hello.pcm -o Hello.exe`

Expected:
construct
Module initialization...
00007FF6ED0971B8
00007FF6ED0971B8
main:
00007FF6ED0971B8
10
destruct

Actual output:
Module initialization...
00007FF6ED0971B8
00007FF6ED0971B8
construct
main:
00007FF6ED0971B8
0
destruct

If I instead use the good old header file pattern and put the inline variable in the header file, I will get the expected result.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyslE1vtDYQxz-NuYxAxoA3HDhks0GN1F7aT2Ds2cWtwZY9fp60n74CtpuoqqIenouN5-3_MwOjUrK3FXFg3Zl1l0Jlmn0cfrV6VtH8nD0vJm_-HH4jDEAeIoboTdbImmfGL4w_1xVo51eEmSikzSxGJsabpTlPlfYLE-OnckyM2qn1VuJ78JFKuzq74lFKVMAk391MnJk4Q5nIsOaij6PgUF5DxClbR-XiTXZYBkUzay6sedmeNsY95xVmdM5XOoQFyjJE1H4J1iGUHn7aXUEvTPJDuvmh0uX1HnG1Dllz2fX-2TddqFj3sii7bnzg7HSXSWQqtTs_Qh-8-I4P3mN9fQ-oCc2jGdqviWLWdBx_2SnArpascvYvRdavVVUdXs45P42jfL3w_lSfn76ybqwPlf8Oqe9oBj8jHOuzpqwc-Ewh06POj8P7173_B-0XsG9XeAO7JkJlICcEmhFu3hvwzsCMymCErbMQFBHGFdRqIGTaA48PGr6paNW03243f0pj4gXe4Lt1Dm54JOG9kRAxZUdVYYbG9E2vChzqU909NV0t-2IedKtko-q-47LFdqqfjOxNI7ls5Un2ghd2EFy0vKslbzvR9tWpm7jUeBVca46tZC3HRVlXOfdtqXy8FTaljEMvmvZUODWhS_s0EGLF77A7mRDbcIjDllNO-ZZYy51NlD6qkCWHA5P8-LHv74FJDqunjx4jTHj1ESGRIqthcl7_UeTohi_mxyZy38oQ_e-oiYlxR0tMjDv63wEAAP__h_J3xQ">