I'm sorry I didn't respond here sooner, but this is not the correct direction for this code to go or the correct solution to the problem.<div><br></div><div>The code in InitHeaderSearch is going away. We're moving it to the driver. If you care about Mingw header search, please work on that rather than on adding regular expressions to the fronted.</div>
<div><br></div><div>The driver already has machinery for searching for arbitrary versions of GCC installations. It already is handling most of the things you've tried to handle here, but in a much more principled way. That's the correct place for this logic to go. Look at the ToolChains.cpp file and the support for Linux header search there.</div>
<div><br></div><div>Also, it needs tests. The current patch adds legacy we'll have to support w/o tests and w/o any confidence that it will work tomorrow. See test/Driver/linux-header-search.cpp for details of how to test this.</div>
<div><br></div><div>Is someone signing up to do this work? I'm tempted to suggest that we shouldn't support this functionality at all unless the support is done in the right...</div><div><br></div><div>Sorry to be the bad guy...</div>