From b046be6858c0a9ea3df48ff77481577226dcd8e8 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Mon, 30 Jan 2017 12:00:05 +0000 Subject: base, sim, dev: Remove SWIG Remove SWIG guards and SWIG-specific C++ code. Change-Id: Icaad6720513b6f48153727ef3f70e0dba0df4bee Signed-off-by: Andreas Sandberg Reviewed-by: Andreas Hansson Reviewed-by: Curtis Dunham Reviewed-on: https://gem5-review.googlesource.com/2921 Reviewed-by: Jason Lowe-Power Reviewed-by: Tony Gutierrez --- src/base/types.hh | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'src/base/types.hh') diff --git a/src/base/types.hh b/src/base/types.hh index 7b115901a..05a29f8bd 100644 --- a/src/base/types.hh +++ b/src/base/types.hh @@ -73,8 +73,7 @@ const Tick MaxTick = ULL(0xffffffffffffffff); * typedef, aiming to avoid unintentional mixing of cycles and ticks * in the code base. * - * Operators are defined inside an ifndef block to avoid swig touching - * them. Note that there is no overloading of the bool operator as the + * Note that there is no overloading of the bool operator as the * compiler is allowed to turn booleans into integers and this causes * a whole range of issues in a handful locations. The solution to * this problem would be to use the safe bool idiom, but for now we @@ -91,18 +90,12 @@ class Cycles public: -#ifndef SWIG // SWIG gets confused by constexpr /** Explicit constructor assigning a value. */ explicit constexpr Cycles(uint64_t _c) : c(_c) { } -#else - explicit Cycles(uint64_t _c) : c(_c) { } -#endif /** Default constructor for parameter classes. */ Cycles() : c(0) { } -#ifndef SWIG // keep the operators away from SWIG - /** Converting back to the value type. */ constexpr operator uint64_t() const { return c; } @@ -138,9 +131,6 @@ class Cycles { return Cycles(c >> shift); } friend std::ostream& operator<<(std::ostream &out, const Cycles & cycles); - -#endif // SWIG not touching operators - }; /** @@ -194,11 +184,9 @@ const PortID InvalidPortID = (PortID)-1; class FaultBase; typedef std::shared_ptr Fault; -#ifndef SWIG // Swig gets really confused by decltype // Rather than creating a shared_ptr instance and assigning it nullptr, // we just create an alias. constexpr decltype(nullptr) NoFault = nullptr; -#endif struct AtomicOpFunctor { -- cgit v1.2.3