================
@@ -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)
----------------
pogo59 wrote:

TIL about `#pragma clang system_header` which turns a header into a system 
header, regardless of how it was found. But, by the time the rewriter sees the 
pragma, it has already emitted the `#include` and its wrapper `#if`. That makes 
the `__CLANG_REWRITTEN_SYSTEM_INCLUDES` not as reliable, and I didn't do that 
part (yet).
But, I did do the `defined(__CLANG_REWRITTEN_INCLUDES)` part, so you can get 
all-or-nothing.

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

Reply via email to