[all-commits] [llvm/llvm-project] 4a16b5: Make -frewrite-includes put an endif at the end of...

Paul T Robinson via All-commits all-commits at lists.llvm.org
Fri Oct 6 12:27:20 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4a16b51f438ad2827220bd21799bfee5ff3d55ef
      https://github.com/llvm/llvm-project/commit/4a16b51f438ad2827220bd21799bfee5ff3d55ef
  Author: Paul T Robinson <paul.robinson at sony.com>
  Date:   2023-10-06 (Fri, 06 Oct 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Frontend/Rewrite/InclusionRewriter.cpp
    M clang/test/Frontend/rewrite-includes-cli-include.c
    M clang/test/Frontend/rewrite-includes.c
    M clang/test/Modules/preprocess-module.cpp

  Log Message:
  -----------
  Make -frewrite-includes put an endif at the end of the included text (#67613)

The #if now has a conditional expression, so a user can add 
`-D__CLANG_REWRITTEN_SYSTEM_INCLUDES` to include the system headers
instead of using the expanded content, or 
`-D__CLANG_REWRITTEN_INCLUDES` to include all headers.
Also added the filename to the comments it emits, to help identify where
included text ends, making it easier to identify and remove the content of
individual headers.




More information about the All-commits mailing list