[clang] [flang] [flang][driver] Add pre-processing type to `.i` (pre-processed) files (PR #104664)
Kareem Ergawy via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 21 21:24:51 PDT 2024
ergawy wrote:
> Please bear with me, it's been a while since I've touched this and also, I am afk 😅
No worries. I am new to this part of the code and might be misinterpreting things myself.
> IIRC, the generated temp files (e.g. *.i) are used for the subsequent compilation phases. So, after pre-processing file.f90 we'd get file.i with all the modules included, no? So -I shouldn't be a concern, right?
We need the changes in this PR to generate the `*.i` files not to use them. More specifically, the call to `Flang::ConstructJob(...)` where `-o <file>.i>` is target output of the job needs the preprocessing phase to process the included/used modules. If you want to further debug it, one thing you can do is to:
- Revert the changes I did in `Types.def`.
- Compile using `--save-temps` on a small sample, you can use the added lit test for that.
- Debug what happens in [this if condition](https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/ToolChains/Flang.cpp#L723) in the the call to `Flang::ConstructJob(...)` where `-o <file>.i>` is part of the `ArgList &Args`.
https://github.com/llvm/llvm-project/pull/104664
More information about the cfe-commits
mailing list