The idea is to move the discovery of the clang resource directory into a more appropriate place, such as the clang expression parser. By continuing with this pattern we can isolate all clang interactions to the clang expression parser. There is a little edge case here in that there is a public enumeration which is used in conjunction with SBHostOS to get a generic LLDB directory. So as not to break the public API, I just special case this particular value of the enumeration and don't pass it through to Host, rather passing it through to the clang expression parser plugin.
I'm not able to test this on OSX, so I expect there may be some easy to fix up compilation errors. Davide, would you mind helping me out with that?
This line fails to build on my old Mac Pro (Mac OS X 10.11, apple-clang-8), complaining that std::next requires a forward iterator, and rev_it is not one.
changing this code to:
fixes the compile error.
Note that these are the most recent OS and tools for this computer.