Blame SOURCES/rhbz1643997.0032-PR23875-bpf_unparser-visit_foreach_loop-temporarily-.patch

583230
From 6fd1813950d708c5b94ed155213a7b9c84b7fbfc Mon Sep 17 00:00:00 2001
583230
From: Serhei Makarov <smakarov@redhat.com>
583230
Date: Tue, 13 Nov 2018 13:13:14 -0500
583230
Subject: [PATCH 32/32] PR23875 bpf_unparser::visit_foreach_loop(): temporarily
583230
 disable string key iteration
583230
583230
---
583230
 bpf-translate.cxx | 4 ++++
583230
 1 file changed, 4 insertions(+)
583230
583230
diff --git a/bpf-translate.cxx b/bpf-translate.cxx
583230
index 20cd47032..0f35e0d3f 100644
583230
--- a/bpf-translate.cxx
583230
+++ b/bpf-translate.cxx
583230
@@ -1532,6 +1532,10 @@ bpf_unparser::visit_foreach_loop(foreach_loop* s)
583230
     throw SEMANTIC_ERROR(_("unknown type"), s->base->tok);
583230
   vardecl *arraydecl = a->referent;
583230
 
583230
+  // TODO PR23875: foreach should handle string keys
583230
+  if (arraydecl->index_types[0] != pe_long)
583230
+    throw SEMANTIC_ERROR(_("unhandled string index type"), s->tok);
583230
+
583230
   auto g = glob.globals.find(arraydecl);
583230
   if (g == glob.globals.end())
583230
     throw SEMANTIC_ERROR(_("unknown array"), arraydecl->tok);
583230
-- 
583230
2.14.5
583230