Repository: dotnet/runtime
File: src/coreclr/jit/emitfmtswasm.h (C/C++)

Code before:
#ifndef IF_DEF
#error Must define IF_DEF macro before including this file
#endif

//////////////////////////////////////////////////////////////////////////////
//
// enum insFormat   instruction            enum ID_OPS
//                  scheduling
//                  (unused)
//////////////////////////////////////////////////////////////////////////////

IF_DEF(NONE,          IS_NONE, NONE)
IF_DEF(OPCODE,        IS_NONE, NONE) // <opcode>
IF_DEF(BLOCK,         IS_NONE, NONE) // <opcode> <0x40>
IF_DEF(RAW_ULEB128,   IS_NONE, NONE) // <ULEB128 immediate>
IF_DEF(ULEB128,       IS_NONE, NONE) // <opcode> <ULEB128 immediate>
IF_DEF(FUNCIDX,       IS_NONE, NONE) // <opcode> <ULEB128 immediate (function index reloc)>
IF_DEF(SLEB128,       IS_NONE, NONE) // <opcode> <LEB128 immediate (signed)>
IF_DEF(MEMADDR,       IS_NONE, NONE) // <opcode> <SLEB128 immediate (memory address reloc)>
IF_DEF(FUNCPTR,       IS_NONE, NONE) // <opcode> <SLEB128 immediate (function pointer reloc)>
IF_DEF(F32,           IS_NONE, NONE) // <opcode> <f32 immediate (stored as 64-bit integer constant)>
IF_DEF(F64,           IS_NONE, NONE) // <opcode> <f64 immediate (stored as 64-bit integer constant)>
IF_DEF(MEMARG,        IS_NONE, NONE) // <opcode> <memarg> (<align> <offset>)
IF_DEF(LOCAL_DECL,    IS_NONE, NONE) // <ULEB128 immediate> <byte>
IF_DEF(CALL_INDIRECT, IS_NONE, NONE) // <opcode> <ULEB128 immediate> <ULEB128 immediate>
IF_DEF(MEMCPY,        IS_NONE, NONE) // <memory index> <memory index>

#undef IF_DEF
#endif // !DEFINE_ID_OPS
// clang-format on


Review comment (suggestion):
Per our earlier conventions discussion, this should be something like `IF_MEMIDX_MEMIDX`.

Code after:
#ifndef IF_DEF
#error Must define IF_DEF macro before including this file
#endif

//////////////////////////////////////////////////////////////////////////////
//
// enum insFormat   instruction            enum ID_OPS
//                  scheduling
//                  (unused)
//////////////////////////////////////////////////////////////////////////////

IF_DEF(NONE,          IS_NONE, NONE)
IF_DEF(OPCODE,        IS_NONE, NONE) // <opcode>
IF_DEF(BLOCK,         IS_NONE, NONE) // <opcode> <0x40>
IF_DEF(RAW_ULEB128,   IS_NONE, NONE) // <ULEB128 immediate>
IF_DEF(ULEB128,       IS_NONE, NONE) // <opcode> <ULEB128 immediate>
IF_DEF(FUNCIDX,       IS_NONE, NONE) // <opcode> <ULEB128 immediate (function index reloc)>
IF_DEF(SLEB128,       IS_NONE, NONE) // <opcode> <LEB128 immediate (signed)>
IF_DEF(MEMADDR,       IS_NONE, NONE) // <opcode> <SLEB128 immediate (memory address reloc)>
IF_DEF(FUNCPTR,       IS_NONE, NONE) // <opcode> <SLEB128 immediate (function pointer reloc)>
IF_DEF(F32,           IS_NONE, NONE) // <opcode> <f32 immediate (stored as 64-bit integer constant)>
IF_DEF(F64,           IS_NONE, NONE) // <opcode> <f64 immediate (stored as 64-bit integer constant)>
IF_DEF(MEMARG,        IS_NONE, NONE) // <opcode> <memarg> (<align> <offset>)
IF_DEF(LOCAL_DECL,    IS_NONE, NONE) // <ULEB128 immediate> <byte>
IF_DEF(CALL_INDIRECT, IS_NONE, NONE) // <opcode> <ULEB128 immediate> <ULEB128 immediate>
IF_DEF(MEMIDX_MEMIDX, IS_NONE, NONE) // <memory index> <memory index>

#undef IF_DEF
#endif // !DEFINE_ID_OPS
// clang-format on