From 205a9fb39c84bbcad07a56ca7c9f69142f7cbc0d Mon Sep 17 00:00:00 2001 From: "Daniel R. Carvalho" Date: Fri, 7 May 2021 14:09:24 -0300 Subject: [PATCH] sim: Turn InitParamKey into an anonymous namespace As part of recent decisions regarding namespace naming conventions, all namespaces will be changed to snake case. pseudo_inst::InitParamKey became an anonymous namespace. Change-Id: I4a9275a1745e1ed78db0ec99dc91f03ad6d5dfac Signed-off-by: Daniel R. Carvalho Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45430 Tested-by: kokoro Reviewed-by: Hoa Nguyen Maintainer: Gabe Black --- src/sim/pseudo_inst.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sim/pseudo_inst.cc b/src/sim/pseudo_inst.cc index a40c956783..11f94f4ee8 100644 --- a/src/sim/pseudo_inst.cc +++ b/src/sim/pseudo_inst.cc @@ -81,7 +81,7 @@ namespace pseudo_inst * @note Each key may be at most 16 characters (because we use * two 64-bit registers to pass in the key to the initparam function). */ -namespace InitParamKey +namespace { /** @@ -97,7 +97,7 @@ const std::string DIST_RANK = "dist-rank"; */ const std::string DIST_SIZE = "dist-size"; -} // namespace InitParamKey +} // anonymous namespace void arm(ThreadContext *tc) @@ -286,11 +286,11 @@ initParam(ThreadContext *tc, uint64_t key_str1, uint64_t key_str2) // Check key parameter to figure out what to return. const std::string key_str(key); - if (key == InitParamKey::DEFAULT) + if (key == DEFAULT) return tc->getCpuPtr()->system->init_param; - else if (key == InitParamKey::DIST_RANK) + else if (key == DIST_RANK) return DistIface::rankParam(); - else if (key == InitParamKey::DIST_SIZE) + else if (key == DIST_SIZE) return DistIface::sizeParam(); else panic("Unknown key for initparam pseudo instruction:\"%s\"", key_str);