<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Oct 16, 2015 at 4:48 PM, Adrian Prantl via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><blockquote type="cite"><div><div class="h5"><div>On Oct 16, 2015, at 3:27 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>> wrote:</div><br></div></div><div><div><div class="h5"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Oct 15, 2015 at 11:14 AM, Adrian Prantl <span dir="ltr"><<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><span><br><div><blockquote type="cite"><div>On Oct 14, 2015, at 5:07 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>> wrote:</div><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>Ack, there are non-modular headers in the Darwin module. =( I seem to recall that they're not version-locked to your compiler, so we've got to support them as-is?</div><div><br></div><div>If we can't turn on local submodule visibility, then we need a module map for libc++ that covers all of its headers. I'll look into pruning the include path when building a module from an implicitly-loaded module map.</div></div></div></div></div></blockquote></div><br></span><div>The attached patch implements this in the most hacky way; with it I can successfully compile the first few hundred files of LLVM.</div></div></blockquote><div><br></div><div>Slightly less hacky approach attached, does this also unstick you? </div></div></div></div>
</div></div><span><no-undeclared-includes.diff></span></div></blockquote><br></div><div>Unfortunately, no. After looking at it in the debugger, I believe the problem is that HeaderSearch looks at RequestingModule->NoUndeclaredIncludes, but the RequestingModule is a nullptr (while looking for cdefs.h included via assert.h, for example).</div></div></blockquote><div><br></div><div>I see; can you try changing the call to getModuleForLocation at the start of Preprocessor::LookupFile to call getModuleContainingLocation instead? (That change will break decl/use checking, but that's not hard to fix.)</div></div></div></div>