From 82708d340da40e84e2a26aaf8fa06b179554855a Mon Sep 17 00:00:00 2001 From: AlexandreSinger Date: Fri, 30 May 2025 16:54:37 -0400 Subject: [PATCH] [Infra] Fixed False Forward Declarations The Clang builds were warning that there were several forward declarations of structs which were supposed to be classes and vice-versa. This is not necessarily a problem since in C++ classes and structs end up being basically the same from the compiler's perspective, but its still incorrect. Fixed the cases I could see in the Clang builds. --- vpr/src/analytical_place/analytical_solver.h | 2 +- vpr/src/analytical_place/full_legalizer.h | 2 +- vpr/src/base/ShowSetup.h | 4 ++-- vpr/src/pack/greedy_clusterer.h | 4 ++-- vpr/src/pack/pack_types.h | 2 +- vpr/src/place/timing/place_timing_update.h | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/vpr/src/analytical_place/analytical_solver.h b/vpr/src/analytical_place/analytical_solver.h index f78859760f..b707032de1 100644 --- a/vpr/src/analytical_place/analytical_solver.h +++ b/vpr/src/analytical_place/analytical_solver.h @@ -28,7 +28,7 @@ #endif // EIGEN_INSTALLED // Forward declarations -class PartialPlacement; +struct PartialPlacement; class APNetlist; class AtomNetlist; class PreClusterTimingManager; diff --git a/vpr/src/analytical_place/full_legalizer.h b/vpr/src/analytical_place/full_legalizer.h index d482d17503..34f1f1da44 100644 --- a/vpr/src/analytical_place/full_legalizer.h +++ b/vpr/src/analytical_place/full_legalizer.h @@ -16,7 +16,7 @@ class APNetlist; class AtomNetlist; class ClusteredNetlist; class DeviceGrid; -class PartialPlacement; +struct PartialPlacement; class PlaceMacros; class PreClusterTimingManager; class Prepacker; diff --git a/vpr/src/base/ShowSetup.h b/vpr/src/base/ShowSetup.h index a73a58cc3f..dd5415793a 100644 --- a/vpr/src/base/ShowSetup.h +++ b/vpr/src/base/ShowSetup.h @@ -4,8 +4,8 @@ #include #include -class t_logical_block_type; -class t_vpr_setup; +struct t_logical_block_type; +struct t_vpr_setup; struct ClusteredNetlistStats { private: diff --git a/vpr/src/pack/greedy_clusterer.h b/vpr/src/pack/greedy_clusterer.h index 324202d535..ae22949f56 100644 --- a/vpr/src/pack/greedy_clusterer.h +++ b/vpr/src/pack/greedy_clusterer.h @@ -17,11 +17,11 @@ #include "vtr_vector.h" // Forward declarations -class APPackContext; +struct APPackContext; class AtomNetId; class AtomNetlist; class AttractionInfo; -class DeviceContext; +struct DeviceContext; class GreedyCandidateSelector; class PreClusterTimingManager; class t_pack_high_fanout_thresholds; diff --git a/vpr/src/pack/pack_types.h b/vpr/src/pack/pack_types.h index b82a520e20..1d3c336072 100644 --- a/vpr/src/pack/pack_types.h +++ b/vpr/src/pack/pack_types.h @@ -12,7 +12,7 @@ #include "atom_netlist_fwd.h" #include "physical_types.h" -struct t_pack_molecule; +class t_pack_molecule; /************************************************************************** * Packing Algorithm Enumerations diff --git a/vpr/src/place/timing/place_timing_update.h b/vpr/src/place/timing/place_timing_update.h index c0e337d320..3f9084cf84 100644 --- a/vpr/src/place/timing/place_timing_update.h +++ b/vpr/src/place/timing/place_timing_update.h @@ -5,13 +5,13 @@ */ class PlacerState; -class PlaceCritParams; +struct PlaceCritParams; class PlacerCriticalities; class PlacerSetupSlacks; class NetPinTimingInvalidator; class PlaceDelayModel; class SetupTimingInfo; -struct t_placer_costs; +class t_placer_costs; ///@brief Initialize the timing information and structures in the placer. void initialize_timing_info(const PlaceCritParams& crit_params,