Patches to support the one-phase compilation model for modules. This is the successor of D134267.
The behavior:
(1) If -o and -c is specified , the module file is in the same path within the same directory as the output the -o specified and with a new suffix .pcm.
(2) Otherwise, the module file is in the same path within the working directory directory with the name of the input file with a new suffix .pcm
For example,
Hello.cppm Use.cpp
A trivial one and the contents are ignored. When we run:
clang++ -std=c++20 -fmodule-output Hello.cppm -c
The directory would look like:
Hello.cppm Hello.o Hello.pcm Use.cpp
And if we run:
clang++ -std=c++20 -fmodule-output Hello.cppm -c -o output/Hello.o
Then the output directory may look like:
Hello.o Hello.pcm
I'll add the ReleaseNotes and documentation after the series got accepted.
Do we do that for -o today? (eg: if you try to -o and specify the input file name, such that the output would overwrite the input, what happens? I'm not sure - but I guess it's OK to do whatever that is for this case too)