[PATCH] D63508: make -frewrite-includes handle __has_include wrapped in a macro

Tor Arne Vestbø via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 19 02:21:28 PDT 2019


torarnv added a comment.

Just a thought: From the point of view of `-frewrite-includes`, it should technically do full/nested macro expansion right? But from the point of view of Icecream, that would defeat the purpose of using `-frewrite-includes`, since the goal is to embed all includes into a single source file, ship it to a remote node, and do the rest of the preprocessing there. Or is there a way to expand all the parts that may resolve to a `__has_include` but leave others as is (for later processing)? How does the code deal with `#if FOO(123) && MACRO_HAS_INCLUDE(<foo.h>)` eg?

>From the Qt side, this patch is good enough, since we only use one level of indirection (to handle compilers without this feature), so I'm just thinking out loud to understand the problem better 😃


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63508/new/

https://reviews.llvm.org/D63508





More information about the cfe-commits mailing list