+2021-03-15 Tom Tromey <tromey@adacore.com>
+
+ PR build/27579:
+ * rust-exp.y (maker_map): Use gdb::hash_enum.
+ * stap-probe.c (stap_maker_map): Use gdb::hash_enum.
+
2021-03-15 Simon Marchi <simon.marchi@polymtl.ca>
* dwarf2/read.c (create_debug_type_hash_table): Remove colon at
#include "gdbarch.h"
#include "rust-exp.h"
#include <unordered_map>
+#include "gdbsupport/hash_enum.h"
#define GDB_YY_REMAP_PREFIX rust
#include "yy-remap.h"
/* Map from an expression opcode to a function that will create an
instance of the appropriate operation subclass. Only binary
operations are handled this way. */
-static std::unordered_map<exp_opcode, binop_maker_ftype *> maker_map;
+static std::unordered_map<exp_opcode, binop_maker_ftype *,
+ gdb::hash_enum<exp_opcode>> maker_map;
/* Lower a rust_op to a gdb expression. STATE is the parser state.
OPERATION is the operation to lower. TOP is a pointer to the
#include "elf-bfd.h"
#include "expop.h"
#include <unordered_map>
+#include "gdbsupport/hash_enum.h"
#include <ctype.h>
expr::operation_up &&);
/* Map from an expression opcode to a function that can create a
binary operation of that type. */
-static std::unordered_map<exp_opcode, binop_maker_ftype *> stap_maker_map;
+static std::unordered_map<exp_opcode, binop_maker_ftype *,
+ gdb::hash_enum<exp_opcode>> stap_maker_map;
/* Helper function to create a binary operation. */
static expr::operation_up