[llvm] [GC] Support bidirectional iterator in GCStrategyMap (PR #99316)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 18 23:46:35 PDT 2024


================
@@ -151,15 +151,46 @@ class GCFunctionInfo {
   size_t live_size(const iterator &p) const { return roots_size(); }
 };
 
-struct GCStrategyMap {
+class GCStrategyMap {
   StringMap<std::unique_ptr<GCStrategy>> StrategyMap;
+  SmallVector<GCStrategy *, 1> StrategyList; // For bidirectional iterator.
----------------
arsenm wrote:

How many entries will this have? 1? 2? Can it just get rid of the map? 

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


More information about the llvm-commits mailing list