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

    <tr>
        <th>Summary</th>
        <td>
            [C++][Modules] `-fmodule-output` does nothing
        </td>
    </tr>

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

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

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

<pre>
    Given some module in file a.cpp

```
export module b;
```

Compiling it with

`clang++ -std=c++20 -x c++-module -fmodule-output=c.pcm --precompile a.cpp`

I would expect to produce a file `c.pcm`. Instead it produces a file `a.pcm`. Am I misunderstanding the purpose of this option? The documentation states

> `-fmodule-output=<arg>`
> Save intermediate module file results when compiling a standard C++ module unit.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxsUt2OnCAUfhq8OdEo6Mx64cXMzk6zF71qXwDhrNIgEDjMbN--0XWnTduERNGP748jUzKTQxxYd2bdpZCZZh8HLW9GJ_IOi9Hrn8MXc0MHyS8Ii9fZIhgHb8YiyEqFwOrTug71vuoTvgcf6RM8MnH-C8Dq07NfgrHGTWAI7obmB42y0k2Mnxk_Q5lIM3FRH1teQ_kO-6bc6cu3j5fSZwqZVnQV1AJlGSKqTeXT6Kf2K9x9thrwPaAiIA8hep0VgvzItbpYSdihruDVJUKpV587LP2Bkw_caYFXWEzKTmNMJJ1e09GMEHIMPiH4N6DZJPCBjHdMXOH7jKC9ygs6kutHSCQJ016GeFkl_k3IxLOMExMveyTxAt_kbb0XwrigNpIed7UZjZiypQT3GR2oR_USNp8yanjeG99PZWeoKvQgdC96WeDQHEXb8GPPj8U8aDH2WDeHeuwU77Du8Ukd2q4dW3XouqYpzMBr3ja8EZw3vD5WXXeUopGtwqdGqLZlbY2LNLay9rZUPk6FSSnj0DR9z_vCyhFt2uaSc4d32P4yztcxjcN6qBzzlFhbW5Mo_aYhQ3Yb6D0Q6y6sO3_dUiXWXf5X6KEG7TGB8zQbNxU52mEmComJE-NXxq-ToTmPlfIL49dVa3-UIfofqIjx6-YwMX7dI9wG_isAAP__j_MSAw">