================ @@ -332,12 +346,14 @@ void InclusionRewriter::CommentOutDirective(Lexer &DirectiveLex, // OutputContentUpTo() would not output anything anyway. return; } - OS << "#if 0 /* expanded by -frewrite-includes */" << MainEOL; + OS << "#if 0 /* " << getIncludedFileName(Inc) ---------------- erichkeane wrote:
I DO think there is at least a good attempt that could be made to get a unique set of names for each (perhaps a stringify of the path, ala how `#line` does it?), but I think this is a good stand-alone feature here. One thing I MIGHT suggest anyway though is replacing the '0' with `defined(__CLANG_REWRITTEN_INCLUDES)`, so that turning on the `#include` version would be trivial. I might also suggest for certain lines, `defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES)` such that only the system headers are used from the test machine. So that is, a system header would be: ```#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* vector expanded by -frewrite-includes */``` https://github.com/llvm/llvm-project/pull/67613 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits