Daniel Carvalho has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/45425 )

Change subject: misc: Rename BitfieldBackend namespace as bitfield_backend
......................................................................

misc: Rename BitfieldBackend namespace as bitfield_backend

As part of recent decisions regarding namespace
naming conventions, all namespaces will be changed
to snake case.

::BitfieldBackend became ::bitfield_backend.

Change-Id: Ibf6c5a93baa9b07aab84dc4ee98960a57d925eaf
Signed-off-by: Daniel R. Carvalho <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45425
Tested-by: kokoro <[email protected]>
Reviewed-by: Hoa Nguyen <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/base/bitunion.hh
1 file changed, 19 insertions(+), 20 deletions(-)

Approvals:
  Hoa Nguyen: Looks good to me, approved
  Gabe Black: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/base/bitunion.hh b/src/base/bitunion.hh
index 3b6ca16..a4eb354 100644
--- a/src/base/bitunion.hh
+++ b/src/base/bitunion.hh
@@ -35,6 +35,7 @@
 #include <typeinfo>

 #include "base/bitfield.hh"
+#include "base/compiler.hh"
 #include "sim/serialize_handlers.hh"

 //      The following implements the BitUnion system of defining bitfields
@@ -168,7 +169,7 @@

 //This namespace is for classes which implement the backend of the BitUnion
 //stuff. Don't use any of these directly.
-namespace BitfieldBackend
+namespace bitfield_backend
 {
     template<class Storage, int first, int last>
     class Unsigned
@@ -382,7 +383,7 @@
             return *this;
         }
     };
-}
+} // namespace bitfield_backend

 //This macro is a backend for other macros that specialize it slightly.
 //First, it creates/extends a namespace "BitfieldUnderlyingClasses" and
@@ -401,14 +402,14 @@
 //overhead.
 #define __BitUnion(type, name) \
     class BitfieldUnderlyingClasses##name : \
-        public BitfieldBackend::BitfieldTypes<type> \
+        public bitfield_backend::BitfieldTypes<type> \
     { \
       protected: \
         typedef type __StorageType; \
-        friend BitfieldBackend::BitUnionBaseType< \
-            BitfieldBackend::BitUnionOperators< \
+        friend bitfield_backend::BitUnionBaseType< \
+            bitfield_backend::BitUnionOperators< \
                 BitfieldUnderlyingClasses##name> >; \
-        friend BitfieldBackend::BitUnionBaseType< \
+        friend bitfield_backend::BitUnionBaseType< \
                 BitfieldUnderlyingClasses##name>; \
       public: \
         union { \
@@ -425,7 +426,7 @@
 #define EndBitUnion(name) \
         }; \
     }; \
-    typedef BitfieldBackend::BitUnionOperators< \
+    typedef bitfield_backend::BitUnionOperators< \
         BitfieldUnderlyingClasses##name> name;

//This sets up a bitfield which has other bitfields nested inside of it. The
@@ -495,8 +496,8 @@


 //These templates make it possible to define other templates related to
-//BitUnions without having to refer to internal typedefs or the BitfieldBackend
-//namespace.
+//BitUnions without having to refer to internal typedefs or the
+// bitfield_backend namespace.

//To build a template specialization which works for all BitUnions, accept a
 //template argument T, and then use BitUnionType<T> as an argument in the
@@ -513,9 +514,9 @@
  * @ingroup api_bitunion
  */
 template <typename T>
-using BitUnionType = BitfieldBackend::BitUnionOperators<T>;
+using BitUnionType = bitfield_backend::BitUnionOperators<T>;

-namespace BitfieldBackend
+namespace bitfield_backend
 {
     template<typename T>
     struct BitUnionBaseType
@@ -528,13 +529,13 @@
     {
         typedef typename BitUnionType<T>::__StorageType Type;
     };
-}
+} // namespace bitfield_backend

 /**
  * @ingroup api_bitunion
  */
 template <typename T>
-using BitUnionBaseType = typename BitfieldBackend::BitUnionBaseType<T>::Type; +using BitUnionBaseType = typename bitfield_backend::BitUnionBaseType<T>::Type;


//An STL style hash structure for hashing BitUnions based on their base type.
@@ -549,12 +550,10 @@
             return hash<BitUnionBaseType<T> >::operator()(val);
         }
     };
-}
+} // namespace std

-
-namespace BitfieldBackend
+namespace bitfield_backend
 {
-
     template<typename T>
     static inline std::ostream &
     bitfieldBackendPrinter(std::ostream &os, const T &t)
@@ -581,11 +580,11 @@
         os << (unsigned int)t;
         return os;
     }
-}
+} // namespace bitfield_backend

 /**
  * A default << operator which casts a bitunion to its underlying type and
- * passes it to BitfieldBackend::bitfieldBackendPrinter.
+ * passes it to bitfield_backend::bitfieldBackendPrinter.
  *
  * @ingroup api_bitunion
  */
@@ -593,7 +592,7 @@
 std::ostream &
 operator << (std::ostream &os, const BitUnionType<T> &bu)
 {
-    return BitfieldBackend::bitfieldBackendPrinter(
+    return bitfield_backend::bitfieldBackendPrinter(
             os, (BitUnionBaseType<T>)bu);
 }




6 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45425
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ibf6c5a93baa9b07aab84dc4ee98960a57d925eaf
Gerrit-Change-Number: 45425
Gerrit-PatchSet: 9
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Hoa Nguyen <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to