This patch adds support for the -include flag to include header files before
parsing the input. It should implement the same behavior as the flag with the
same name in clang.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
In what cases would this flag be used in practice? I've scanned Clang and couldn't find any answers.
It is introduced to the arguments list in Clang::AddPreprocessingOptions in certain cases to add the OpenMP wrapper "__clang_openmp_device_functions.h" to the list of includes for device offload. It seemed likely that we would need to add a similar mechanism eventually to flang as well, although I suppose it could also be useful in other situations.
This is a use case in Clang ;-)
It seemed likely that we would need to add a similar mechanism eventually to flang as well
Possibly, but it's not needed yet?
I would rather refrain from adding flags to Flang only because a similar flag exists in Clang. I suggest abandoning this until there's a clear need for this in Flang.
Sure, sounds reasonable. I suppose this will most likely come together with the rest of changes needed for basic offload then. Thank you!