[llvm] [ADT][ProfileData] Introduce SortedVectorMap and switch CallTargetMap to it (PR #215733)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 14:59:36 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- llvm/include/llvm/ADT/SortedVectorMap.h llvm/unittests/ADT/SortedVectorMapTest.cpp llvm/include/llvm/ProfileData/SampleProf.h --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/include/llvm/ADT/SortedVectorMap.h b/llvm/include/llvm/ADT/SortedVectorMap.h
index 4983347b5..709577121 100644
--- a/llvm/include/llvm/ADT/SortedVectorMap.h
+++ b/llvm/include/llvm/ADT/SortedVectorMap.h
@@ -13,8 +13,8 @@
 ///
 /// SortedVectorMap is intended for:
 /// - Small maps where memory footprint is a primary concern. In particular, it
-///   avoids the initial bucket overhead of DenseMap (e.g. 64 buckets by default)
-///   when only a few elements are stored.
+///   avoids the initial bucket overhead of DenseMap (e.g. 64 buckets by
+///   default) when only a few elements are stored.
 /// - Use cases that require iteration in sorted key order.
 ///
 /// Trade-offs:
diff --git a/llvm/unittests/ADT/SortedVectorMapTest.cpp b/llvm/unittests/ADT/SortedVectorMapTest.cpp
index da7f4a033..9b6fdbd63 100644
--- a/llvm/unittests/ADT/SortedVectorMapTest.cpp
+++ b/llvm/unittests/ADT/SortedVectorMapTest.cpp
@@ -35,8 +35,8 @@ TEST(SortedVectorMapTest, BasicOperations) {
 
   // Verify elements are maintained in sorted key order
   EXPECT_THAT(Map, testing::ElementsAre(testing::Pair(2, "two"),
-                                       testing::Pair(5, "five"),
-                                       testing::Pair(8, "eight")));
+                                        testing::Pair(5, "five"),
+                                        testing::Pair(8, "eight")));
 }
 
 TEST(SortedVectorMapTest, FindAndErase) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/215733


More information about the llvm-commits mailing list