Files
clang-p2996/lldb/source/Plugins/Language/ObjC/NSArray.cpp
Alex Langford 8e0001eb95 [lldb][NFCI] Refactor Language::GetFormatterPrefixSuffix
- 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).

Differential Revision: https://reviews.llvm.org/D151603
2023-05-30 13:11:55 -07:00

26 KiB