[clang] [Modules] No transitive source location change (PR #86912)
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 28 01:39:45 PDT 2024
ChuanqiXu9 wrote:
BTW, after this patch, with reduced BMI (https://github.com/llvm/llvm-project/pull/85050), we can already do something more interesting than reformating:
```
//--- A.cppm
export module A;
int funcA0();
int funcA1();
export int funcA() {
return funcA0();
}
//--- A.v1.cppm
export module A;
int funcA0();
int funcA1();
export int funcA() {
return funcA0() + funcA1();
}
//--- B.cppm
export module B;
import A;
export int funcB() {
return funcA();
}
```
Now the B.pcm will keep unchanged with `A.pcm` from `A.cppm` and `A.v1.pcm` from `A.v1.cppm`. We changed the implementation of `funcA()` from `return funcA0();` to `return funcA0() + funcA1();`. And the `B.pcm` can still get the same content.
https://github.com/llvm/llvm-project/pull/86912
More information about the cfe-commits
mailing list