Clang compilers return an error about MiscRegNames being unused.
M5_VAR_USED fixes this.
Change-Id: I515c5d1e8837020b674de49039c0525f896b7e37
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29452
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
#include "arch/riscv/pagetable.hh"
#include "arch/riscv/registers.hh"
#include "base/bitfield.hh"
+#include "base/compiler.hh"
#include "cpu/base.hh"
#include "debug/Checkpoint.hh"
#include "debug/RiscvMisc.hh"
namespace RiscvISA
{
-const std::array<const char *, NumMiscRegs> MiscRegNames = {{
+const std::array<const char *, NumMiscRegs> M5_VAR_USED MiscRegNames = {{
[MISCREG_PRV] = "PRV",
[MISCREG_ISA] = "ISA",
[MISCREG_VENDORID] = "VENDORID",