[PATCH] rewrite-includes: Rewrite __has_include(_next) to get rid of a host dependency.

Benjamin Kramer benny.kra at gmail.com
Fri Mar 29 06:49:03 PDT 2013


Hi dblaikie,

This broke e.g. compiling a crash report from a glibc system on Darwin. Sadly,
the implementation had to game the lexer a lot as we're not using a real
preprocessor here. It also doesn't handle special cases like arbitrary macros in
__has_include, but since this macro isn't common outside of clang's headers we
can get away with that.

Fixes PR14422.

http://llvm-reviews.chandlerc.com/D594

Files:
  lib/Rewrite/Frontend/InclusionRewriter.cpp
  test/Frontend/Inputs/rewrite-includes8.h
  test/Frontend/rewrite-includes.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D594.1.patch
Type: text/x-patch
Size: 8300 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130329/b542b7af/attachment.bin>


More information about the cfe-commits mailing list