Skip to content

Commit 1d81fbc

Browse files
committed
gemini + tidy-review fixes
Signed-off-by: Matt Liberty <[email protected]>
1 parent 58cfd59 commit 1d81fbc

22 files changed

+54
-17
lines changed

src/dbSta/test/cpp/TestHconn.cpp

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@
3434
namespace odb {
3535

3636
static const std::string prefix("_main/src/dbSta/test/");
37+
static constexpr bool kDebugMsgs = false;
3738

3839
/*
3940
Extract the hierarchical information in human readable format.
4041
Shows the dbNet and dbModNet view of the database.
4142
*/
4243

43-
// NOLINTNEXTLINE(clang-diagnostic-unused-function)
4444
static void DbStrDebugHierarchy(dbBlock* block, std::stringstream& str_db)
4545
{
4646
str_db << fmt::format("Debug: Data base tables for block at {}:\n",
@@ -528,9 +528,11 @@ class TestHconn : public ::tst::Fixture
528528
inv4_3_op_->connect(op2_net_);
529529
inv4_4_op_->connect(op3_net_);
530530

531-
// std::stringstream str_str;
532-
// DbStrDebugHierarchy(block_, str_str);
533-
// printf("The Flat design created %s\n", str_str.str().c_str());
531+
if (kDebugMsgs) {
532+
std::stringstream str_str;
533+
DbStrDebugHierarchy(block_, str_str);
534+
printf("The Flat design created %s\n", str_str.str().c_str());
535+
}
534536

535537
// Now build the hierarchical "overlay"
536538
// What we are doing here is adding the modnets which hook up
@@ -646,11 +648,12 @@ class TestHconn : public ::tst::Fixture
646648
inv4_mod_level2_inst_o3_miterm_->connect(inv4_mod_level2_inst_o3_mnet_);
647649
inv4_mod_level1_master_o3_port_->connect(inv4_mod_level2_inst_o3_mnet_);
648650

649-
// Uncomment this to see the full design
650-
// std::stringstream full_design;
651-
// DbStrDebugHierarchy(block_, full_design);
652-
// printf("The design created (flat and hierarchical) %s\n",
653-
// full_design.str().c_str());
651+
if (kDebugMsgs) {
652+
std::stringstream full_design;
653+
DbStrDebugHierarchy(block_, full_design);
654+
printf("The design created (flat and hierarchical) %s\n",
655+
full_design.str().c_str());
656+
}
654657
}
655658

656659
sta::LibertyLibrary* library_;
@@ -789,9 +792,11 @@ class TestHconn : public ::tst::Fixture
789792

790793
TEST_F(TestHconn, ConnectionMade)
791794
{
792-
// std::stringstream str_str_initial;
793-
// DbStrDebugHierarchy(block_, str_str_initial);
794-
// printf("The initial design: %s\n", str_str_initial.str().c_str());
795+
if (kDebugMsgs) {
796+
std::stringstream str_str_initial;
797+
DbStrDebugHierarchy(block_, str_str_initial);
798+
printf("The initial design: %s\n", str_str_initial.str().c_str());
799+
}
795800

796801
// ECO test: get initial state before we start modifying
797802
// the design. Then at end we undo everything and
@@ -897,10 +902,11 @@ TEST_F(TestHconn, ConnectionMade)
897902
db_network_->hierarchicalConnect(
898903
inv1_2_inst_op0, inv4_4_ip_, hier_net_name.c_str());
899904

900-
// Uncomment this to see the final design
901-
// std::stringstream str_str_final;
902-
// DbStrDebugHierarchy(block_, str_str_final);
903-
// printf("The final design: %s\n", str_str_final.str().c_str());
905+
if (kDebugMsgs) {
906+
std::stringstream str_str_final;
907+
DbStrDebugHierarchy(block_, str_str_final);
908+
printf("The final design: %s\n", str_str_final.str().c_str());
909+
}
904910

905911
// Example of how to turn on the call backs for all the bterms/iterms
906912
// used by the sta

src/dst/include/dst/BalancerJobDescription.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22
// Copyright (c) 2021-2025, The OpenROAD Authors
33

44
#pragma once
5+
6+
#include <cstdint>
57
#include <string>
68

79
#include "boost/serialization/base_object.hpp"
810
#include "dst/JobMessage.h"
11+
912
namespace boost::serialization {
1013
class access;
1114
}
15+
1216
namespace dst {
1317

1418
class BalancerJobDescription : public JobDescription
@@ -32,4 +36,5 @@ class BalancerJobDescription : public JobDescription
3236
}
3337
friend class boost::serialization::access;
3438
};
39+
3540
} // namespace dst

src/dst/include/dst/BroadcastJobDescription.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22
// Copyright (c) 2022-2025, The OpenROAD Authors
33

44
#pragma once
5+
6+
#include <cstdint>
7+
58
#include "boost/serialization/base_object.hpp"
69
#include "dst/JobMessage.h"
10+
711
namespace boost::serialization {
812
class access;
913
}
14+
1015
namespace dst {
1116

1217
class BroadcastJobDescription : public JobDescription
@@ -26,4 +31,5 @@ class BroadcastJobDescription : public JobDescription
2631
}
2732
friend class boost::serialization::access;
2833
};
34+
2935
} // namespace dst

src/dst/include/dst/Distributed.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#pragma once
55

6+
#include <cstdint>
67
#include <memory>
78
#include <string>
89
#include <vector>

src/dst/src/BalancerConnection.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <dst/JobMessage.h>
77

88
#include <cstddef>
9+
#include <cstdint>
910
#include <exception>
1011
#include <memory>
1112
#include <mutex>

src/dst/src/LoadBalancer.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "LoadBalancer.h"
55

66
#include <algorithm>
7+
#include <cstdint>
78
#include <cstring>
89
#include <exception>
910
#include <limits>

src/dst/src/LoadBalancer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
#include "BalancerConnection.h"
1515
#include "boost/asio.hpp"
16+
#include "boost/asio/ip/address.hpp"
1617
#include "boost/asio/thread_pool.hpp"
1718
#include "boost/thread/thread.hpp"
1819

src/dst/test/cpp/TestBalancer.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include <cstdint>
12
#include <string>
23

34
#include "HelperCallBack.h"

src/dst/test/cpp/TestDistributed.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include <cstdint>
12
#include <string>
23
#include <vector>
34

src/odb/src/def/cdef/defrReader.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#ifndef CDEFRREADER_H
3434
#define CDEFRREADER_H
3535

36+
#include <cstdint>
3637
#include <cstdio>
3738

3839
#include "defiTypedefs.h"

0 commit comments

Comments
 (0)