We have tilde's in our dSYMs internally, and expanding these can involve a network access that is slow for some people. I'm not worried about tilde expanding to a different filepath during the lifetime of a single lldb session, and I believe people will see very few different tildes ever expanded -- I'd be surprised if anyone exceed five different tilde's -- so this would be something easy to cache in lldb given how TildeExpressionResolver::ResolveFullPath() is structured.
This patch creates a simple vector of <ConstString, std::string>'s with the tilde names (ConstString to make comparisons cheap) and the expanded filepath. The method accepts a filepath as a StringRef and returns an expanded path in a SmallVectorImpl<char>, but I don't think the specific container used is important one way or the other. I'm not wedded to this impl though.
This bit of code has been untouched in years, but adding Jonas who did touch it a couple years ago.
rdar://77091379