summaryrefslogtreecommitdiff
path: root/bolt
diff options
context:
space:
mode:
authorJakub Kuderski <jakub@nod-labs.com>2025-11-01 20:12:33 -0400
committerGitHub <noreply@github.com>2025-11-02 00:12:33 +0000
commit4c21d0cb14806fe1f5f42abd9d7e772013f625cb (patch)
tree670c43810ae246c8d6fec7290fa33aa7c98ed4bc /bolt
parent8331c732b4ce523e0731981ffd42f4e3f4064d2d (diff)
[ADT] Prepare to deprecate variadic `StringSwitch::Cases`. NFC. (#166020)
Update all uses of variadic `.Cases` to use the initializer list overload instead. I plan to mark variadic `.Cases` as deprecated in a followup PR. For more context, see https://github.com/llvm/llvm-project/pull/163117.
Diffstat (limited to 'bolt')
-rw-r--r--bolt/lib/Profile/DataAggregator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/bolt/lib/Profile/DataAggregator.cpp b/bolt/lib/Profile/DataAggregator.cpp
index e44d956c86e5..4e062038a3e4 100644
--- a/bolt/lib/Profile/DataAggregator.cpp
+++ b/bolt/lib/Profile/DataAggregator.cpp
@@ -1321,7 +1321,8 @@ std::error_code DataAggregator::parseAggregatedLBREntry() {
}
using SSI = StringSwitch<int>;
- AddrNum = SSI(Str).Cases("T", "R", 3).Case("S", 1).Case("E", 0).Default(2);
+ AddrNum =
+ SSI(Str).Cases({"T", "R"}, 3).Case("S", 1).Case("E", 0).Default(2);
CounterNum = SSI(Str).Case("B", 2).Case("E", 0).Default(1);
}