[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 29 09:39:38 PDT 2023
================
@@ -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:
Hmm... ok. The 'all or nothing' is fine. As far as the system-includes, I wouldn't mind it if we were imperfect, as this is exclusively a debugging tool, thus any amount of ABI/API/etc stability doesn't really exist. So I'm ok with a bit of a 'best effort' here (same on the enabling individual headers).
we can always revise this as we determine needs.
BTW, I'm ok with this patch, but I am not the code owner here, so I'd like to give others a better chance to review this, particularly @MaskRay .
https://github.com/llvm/llvm-project/pull/67613
More information about the cfe-commits
mailing list