<div dir="ltr">I played with this some more, and determined that the best place to load the module map files is from the frontend rather than from header search; I modified your patch to do that and landed it as r223561.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 24, 2014 at 6:00 PM, John Thompson <span dir="ltr"><<a href="mailto:john.thompson.jtsoftware@gmail.com" target="_blank">john.thompson.jtsoftware@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sorry, I missed the hard tab, braces, and etc.  However, if I remove the clearing of the ModuleMapFiles member, one of the tests, Modules/modular_maps.cpp segfaults deep in some AST code, but only on running the test on Linux, so it's kind of hard to debug, not being much of a Linux/gdb guy.  Did I put this code in the right place?  I was kind of uncomfortable putting it in the HeaderSearch constructor, but it is a convenient place, since HeaderSearch has convenient members.  I don't see any other references to the ModuleMapFiles member, so I'm not sure what triggers the segfault only on Linux, unless it's some memory-stomping or post-free-write issue somewhere.<br>
<div class="HOEnZb"><div class="h5"><br>
<a href="http://reviews.llvm.org/D6324" target="_blank">http://reviews.llvm.org/D6324</a><br>
<br>
Files:<br>
  include/clang/Basic/DiagnosticLexKinds.td<br>
  lib/Lex/HeaderSearch.cpp<br>
  test/Modules/pr21217.cpp<br>
</div></div></blockquote></div><br></div>