mem: Removed circular include ref
authorRyan Gambord <gambordr@oregonstate.edu>
Thu, 14 Mar 2019 10:30:46 +0000 (03:30 -0700)
committerRyan Gambord <gambordr@oregonstate.edu>
Fri, 15 Mar 2019 19:29:23 +0000 (19:29 +0000)
If BasicLink.hh is modified, the style checker forces a reordering of
the includes, which results in build errors because it ends up including
Topology.hh before including its xxxParams.hh files, which include
forward declarations of the BasicLink family of classes, and so
Topology.hh throws errors that BasicLink etc. are not declared.

Change-Id: I664a0652e53f0cc61763c2190a980c655b85d397
Signed-off-by: Ryan Gambord <gambordr@oregonstate.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17270
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>

src/mem/ruby/network/BasicLink.hh

index 39c20969fb9aa667d88ae5e1786f52f0ed46368a..755e5c7a7aa500a862fcc36fdede353827d64fb5 100644 (file)
 #include <string>
 #include <vector>
 
+#include "mem/ruby/network/BasicRouter.hh"
+#include "mem/ruby/slicc_interface/AbstractController.hh"
 #include "params/BasicExtLink.hh"
 #include "params/BasicIntLink.hh"
 #include "params/BasicLink.hh"
-#include "mem/ruby/network/BasicRouter.hh"
-#include "mem/ruby/network/Topology.hh"
-#include "mem/ruby/slicc_interface/AbstractController.hh"
 #include "sim/sim_object.hh"
 
+class Topology;
+
 class BasicLink : public SimObject
 {
   public: