[repacker] implement MarkBasePosFormat1::clone_range.
diff --git a/src/graph/graph.hh b/src/graph/graph.hh
index 0d6adcb..85623c2 100644
--- a/src/graph/graph.hh
+++ b/src/graph/graph.hh
@@ -60,6 +60,18 @@
       hb_swap (a.priority, b.priority);
     }
 
+    hb_hashmap_t<unsigned, unsigned>
+    position_to_index_map () const
+    {
+      hb_hashmap_t<unsigned, unsigned> result;
+
+      for (const auto& l : obj.real_links) {
+        result.set (l.position, l.objidx);
+      }
+
+      return result;
+    }
+
     bool is_shared () const
     {
       return parents.length > 1;