<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/60555>60555</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[C++20] [Modules] Part of the time trace information may miss in one phase compilation
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:modules
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ChuanqiXu9
</td>
</tr>
</table>
<pre>
When we run:
```
clang++ -std=c++20 -ftime-trace a.cppm -c -o a.o
```
The command line is interpreted to the following two instructions:
```
clang++ -std=c++20 -ftime-trace a.cppm --precompile -o /tmp/a.pcm
clang++ -std=c++20 -ftime-trace /tmp/a.pcm -c -o a.o
```
The problem here is that both of the instruction will emit time trace information to `./a.json` by default. But the result of the second step will overwrite the result from the first step. So part of the information is missing in one phase compilation.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysU0Fr3DwQ_TXyZbBR5LWzPviQzbK3Dz5oob3K8nitIGlUaZwl_76sNiEpNNBCwcgIRu-9eW9G52zPAXEU3UF0x0pvvFIaH9dNhx_2-zZUE80v47cVA1wQ0hZE-yDkUci3s5evX7kap8NZqINQB6gzz6I9mttVSagXth5rTtog6MbE6KE2UBPohn4Ldzu_rgiGvNdhBmcDgs1gA2OKCRlnYAJeERZyji42nIEvBDZkTpthSyH_a811TGjIR-vwql6oE_so1Ek30fi_Bf319R8bEhNNDj2smIohvGqGiXgFWoodHwyAi3UO0FuGKzHciG1YKHldCphA9LIpKp4yBdFLmF5gxkVvjhs4bFxAE-bN8RtFRkNhhswYbxT0jOmSLOPH4iWRvwVkU-ZS3cAXgqgTv4t912IzeJvzNUgbgAJCXHUuIxCtKzVNNY_tPLSDrnC86--7_r5ru6FaxwX7nZn6flFyr4ZuPw-9kqg60877dqexsqOSqpVK9nJQqh2ae3M3TPsd4rKX-91ixE6i19Y1zj37htK5sjlvOPay67rK6QldLuui1C3k9sHTvDnMQqnrDqXx-rKetnMWO-ls5vyOxZZd2bbHt2kQ3RFEd_jvFaM7wv8fjPkkL69fikmfOlRtyY0rcyzDr05Cnc6W121qDHmhTldBr786JnpCw0KdSqdZqFNp9mcAAAD__6r3TYQ">