Skip to content

Conversation

@llvmbot
Copy link
Member

@llvmbot llvmbot commented May 7, 2025

Backport ed0aa99

Requested by: @ldionne

@llvmbot llvmbot requested a review from a team as a code owner May 7, 2025 14:16
@llvmbot llvmbot added this to the LLVM 20.X Release milestone May 7, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in LLVM Release Status May 7, 2025
@llvmbot
Copy link
Member Author

llvmbot commented May 7, 2025

@ldionne What do you think about merging this PR to the release branch?

@llvmbot llvmbot requested a review from ldionne May 7, 2025 14:16
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label May 7, 2025
@llvmbot
Copy link
Member Author

llvmbot commented May 7, 2025

@llvm/pr-subscribers-libcxx

Author: None (llvmbot)

Changes

Backport ed0aa99

Requested by: @ldionne


Full diff: https://github.com/llvm/llvm-project/pull/138880.diff

2 Files Affected:

  • (modified) libcxx/include/__flat_map/flat_map.h (+1-1)
  • (modified) libcxx/include/__flat_map/flat_multimap.h (+1-1)
diff --git a/libcxx/include/__flat_map/flat_map.h b/libcxx/include/__flat_map/flat_map.h
index a0594ed9dc411..9cc39c0a1e067 100644
--- a/libcxx/include/__flat_map/flat_map.h
+++ b/libcxx/include/__flat_map/flat_map.h
@@ -113,7 +113,7 @@ class flat_map {
 
   class value_compare {
   private:
-    key_compare __comp_;
+    _LIBCPP_NO_UNIQUE_ADDRESS key_compare __comp_;
     _LIBCPP_HIDE_FROM_ABI value_compare(key_compare __c) : __comp_(__c) {}
     friend flat_map;
 
diff --git a/libcxx/include/__flat_map/flat_multimap.h b/libcxx/include/__flat_map/flat_multimap.h
index ea77fb5d79bd2..15fcd7995ad0a 100644
--- a/libcxx/include/__flat_map/flat_multimap.h
+++ b/libcxx/include/__flat_map/flat_multimap.h
@@ -115,7 +115,7 @@ class flat_multimap {
 
   class value_compare {
   private:
-    key_compare __comp_;
+    _LIBCPP_NO_UNIQUE_ADDRESS key_compare __comp_;
     _LIBCPP_HIDE_FROM_ABI value_compare(key_compare __c) : __comp_(__c) {}
     friend flat_multimap;
 

@github-project-automation github-project-automation bot moved this from Needs Triage to Needs Merge in LLVM Release Status May 7, 2025
@tstellar
Copy link
Collaborator

tstellar commented May 9, 2025

Can we ignore these failing tests?

@tstellar tstellar moved this from Needs Merge to Needs Test Fix in LLVM Release Status May 10, 2025
@tstellar
Copy link
Collaborator

@ldionne ping.

1 similar comment
@tstellar
Copy link
Collaborator

@ldionne ping.

@philnik777
Copy link
Contributor

@tstellar The CI failures are most certainly unrelated.

@tstellar tstellar moved this from Needs Test Fix to Needs Merge in LLVM Release Status Jun 12, 2025
…pare (llvm#137594)

This breaks the ABI of `flat_{,multi}map::value_compare`, but this type
has only been introduced in LLVM 20, so it should be very unlikely that
we break anybody if we back-port this now.

(cherry picked from commit ed0aa99)
@tstellar tstellar merged commit 337beb7 into llvm:release/20.x Jun 12, 2025
12 of 13 checks passed
@github-project-automation github-project-automation bot moved this from Needs Merge to Done in LLVM Release Status Jun 12, 2025
@github-actions
Copy link

@ldionne (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Projects

Development

Successfully merging this pull request may close these issues.

4 participants