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

    <tr>
        <th>Summary</th>
        <td>
            [C++20] [Modules] Don't generate paths implicitly in BMI to their dependent BMI
        </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>
    See https://discourse.llvm.org/t/c-20-modules-should-the-bmis-contain-paths-to-their-dependent-bmis/70422 for detail.

Simply, after the issue resolved, the last step of the following example won't  compile any more:

```
// b.cppm
export module b;
export int b() {
    return 43;
}

// a.cppm
export module a;
import b;
export int a() {
    return b() + 43;
}

// user.cpp
import a;
int use() {
    return a();
}
```

```
clang++ -std=c++20 b.cppm --precompile -o b.pcm
clang++ -std=c++20 a.cppm --precompile -fmodule-file=b=b.pcm -o a.pcm
clang++ -std=c++20 user.cpp -fmodule-file=a=a.pcm -c -o user.o
```

We need to specify all the dependency explicitly:

```
clang++ -std=c++20 user.cpp -fmodule-file=a=a.pcm -fmodule-file=b=b.pcm  -c -o user.o
```

This will be an broken change.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVMGOpDYQ_RpzKRm5DTTdBw7Tg1rKYU8bKbkauwAnxia22Zn--8hAT3aS2c5IKzWNKLvqvXplPxGCHixiQ6oLqdpMLHF0vnkeF2H_0r8v56xz6tZ8RYQxxjmQ4onwK-FXpYN0iw-YG_Ntyp0fCL9Gwq-SckYnpxaDgYbRLUbROCLtJh2odDYKbeks4hhodGlFe6pwRqvQxnUX4dealZxD7zwojEKbnLCWsKft_6ueZnMj_BlEH9FDHBF0CAuCx-DMN1RpLUWNCBFCxBlcvwZ6Z4x70XYAfBXTbBBenCW8jgDSTbM2CMLeYHIeU6ffgZIj23_b5yoCdLmc52kL4evsfIStdehIcXkX1zZCR_iJ8DOQel8DAPAYF2-hLN4ySN2-g96wxA-xxFumntb4h-DiAfgbMX75fyJLQJ-4vIP8joONacsDtJ3JBzD_EvmjoDTCDoRfElUaoiJFK7dPzvZ5AKWzx_tAqYMun-X0iXTxUXq_qUx7bZAUbZeeVC8VFp8sfJfsP9VEerZqMhVcN7oHavyGYBEVRAdhRqn7Gwhj1sN9v0XyBvg6Gy11NLfHx_inSf9QnM_28-uoA7xoY6BLdw867_5EC3IUdsA8U02hzsVZZNgcjqfycKjOFcvGpi7qsuRcnFWJ5bGr-_5Q1Vic1In1xbE8ZrrhjBesOlTsUJ0PLO8Y5yhVWTJxKnp1IiXDKVnL3b-y1UOaI69ZnRnRoQmrK3K-qVQ87a5GOE9W6ZuUSbtlCKRkRocY_qkVdTSrqT7f5SRVC6S6fNlrVC20u_UMaNGLiLC6IiR322YH2sLlyy9p1qtPvk04pnC2eNO8N-VBx3Hpcukmwq-Jy_6is3d_oEz2vDaZLHbt8-8AAAD__-YrxoI">