summaryrefslogtreecommitdiff
path: root/src/base/types.hh
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2017-01-30 12:00:05 +0000
committerAndreas Sandberg <andreas.sandberg@arm.com>2017-05-02 12:37:32 +0000
commitb046be6858c0a9ea3df48ff77481577226dcd8e8 (patch)
tree15a2a4844b0d54b0280ed24c7cd3900274d01734 /src/base/types.hh
parent8eb84518f15fcef59da90e7ec72e2bc88fb5b59d (diff)
downloadgem5-b046be6858c0a9ea3df48ff77481577226dcd8e8.tar.xz
base, sim, dev: Remove SWIG
Remove SWIG guards and SWIG-specific C++ code. Change-Id: Icaad6720513b6f48153727ef3f70e0dba0df4bee Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Andreas Hansson <andreas.hansson@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-on: https://gem5-review.googlesource.com/2921 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com>
Diffstat (limited to 'src/base/types.hh')
-rw-r--r--src/base/types.hh14
1 files changed, 1 insertions, 13 deletions
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<FaultBase> 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
{