- Remove unused parameter valobj (I checked downstream, not even swift is using it).
- Return a std::pair<StringRef, StringRef> insted of having 2 out parameter strings.
- Remove the use of ConstStrings.
This change was primarily mechanical except in
ObjCLanguage::GetFormatterPrefixSuffix. To keep this fast, we
construct an llvm::StringMap<std::pair<StringRef, StringRef>> so that we
can look things up quickly. There is some amount of cost to setting up
the map the first time it is called, but subsequent lookups should be
as fast as a hash + string comparison (the cost of looking up something
in an llvm::StringMap).
We can make this whole map const and remove the explicit call_once by folding the insert calls into the ctor:
If you're so inclined, you can even get rid of the final make_pair calls: