Author: Nikolas Klauser Date: 2025-06-12T11:29:59-07:00 New Revision: 337beb73abfe05c2db1158f211042eb8763165ea
URL: https://github.com/llvm/llvm-project/commit/337beb73abfe05c2db1158f211042eb8763165ea DIFF: https://github.com/llvm/llvm-project/commit/337beb73abfe05c2db1158f211042eb8763165ea.diff LOG: [libc++] Add _LIBCPP_NO_UNIQUE_ADDRESS to flat_{,multi}map::value_compare (#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 ed0aa9961caa177098e9b7e69e98034d676f192e) Added: Modified: libcxx/include/__flat_map/flat_map.h libcxx/include/__flat_map/flat_multimap.h Removed: ################################################################################ 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; _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits