Daniel Carvalho has uploaded this change for review. (
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]>
---
M src/base/bitunion.hh
1 file changed, 16 insertions(+), 17 deletions(-)
diff --git a/src/base/bitunion.hh b/src/base/bitunion.hh
index 3b6ca16..a71e5ca 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,8 +169,8 @@
//This namespace is for classes which implement the backend of the BitUnion
//stuff. Don't use any of these directly.
-namespace BitfieldBackend
-{
+GEM5_DEPRECATED_NAMESPACE(BitfieldBackend, bitfield_backend);
+namespace bitfield_backend {
template<class Storage, int first, int last>
class Unsigned
{
@@ -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,10 +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
{
@@ -534,7 +534,7 @@
* @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.
@@ -552,8 +552,7 @@
}
-namespace BitfieldBackend
-{
+namespace bitfield_backend {
template<typename T>
static inline std::ostream &
@@ -585,7 +584,7 @@
/**
* 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);
}
--
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: 1
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s