[PATCH] D32111: [modules] Attempt to fix PR31905 - #include "stddef.h" breaks module map search paths; causes redefinitions.

Eric Fiselier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 2 20:56:53 PDT 2017


EricWF updated this revision to Diff 101307.
EricWF edited the summary of this revision.
EricWF added reviewers: rtrieu, dexonsmith, dblaikie, aprantl, v.g.vassilev.
EricWF added a comment.

- Only allow the top  level header search directories to be search for `module.modulemap` files when loading modules in `ReadAST.cpp`.

Perhaps it would be better to figure out what top-level search directory the module was originally built under, and then remove the prefix of the top-level directory. Then we could allow the search to look under matching subdirectories of other top-level search paths. However this seems like it could be incorrect as well.

@zygoloid: Any thoughts?


https://reviews.llvm.org/D32111

Files:
  include/clang/Lex/HeaderSearch.h
  lib/Lex/HeaderSearch.cpp
  lib/Serialization/ASTReader.cpp
  test/Modules/Inputs/PR31905/my-project/module.modulemap
  test/Modules/Inputs/PR31905/my-project/my-header.h
  test/Modules/pr31905.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32111.101307.patch
Type: text/x-patch
Size: 5549 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170603/08599482/attachment.bin>


More information about the cfe-commits mailing list