Skip to content

Commit 637b25b

Browse files
authored
Merge pull request #8510 from hzeller/feature-20251001-no-cyclic-dep
dbCompare is an implementation artifact of db.h. Make an inc.
2 parents 7b5fbf8 + f30c293 commit 637b25b

File tree

8 files changed

+5
-11
lines changed

8 files changed

+5
-11
lines changed

src/gui/src/dbDescriptors.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include "db_sta/dbSta.hh"
3131
#include "gui/gui.h"
3232
#include "odb/db.h"
33-
#include "odb/dbCompare.h"
3433
#include "odb/dbObject.h"
3534
#include "odb/dbShape.h"
3635
#include "odb/dbTransform.h"

src/odb/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ cc_library(
4646
"src/lefout/*.cpp",
4747
"src/3dblox/*.cpp",
4848
"src/3dblox/*.h",
49+
"include/odb/dbCompare.inc",
4950
] + [
5051
"src/swig/common/swig_common.cpp",
5152
]),

src/odb/include/odb/db.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10992,4 +10992,4 @@ class dbDoubleProperty : public dbProperty
1099210992
} // namespace odb
1099310993

1099410994
// Overload std::less for these types
10995-
#include "odb/dbCompare.h"
10995+
#include "odb/dbCompare.inc" // IWYU pragma: export
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// SPDX-License-Identifier: BSD-3-Clause
22
// Copyright (c) 2019-2025, The OpenROAD Authors
33

4-
#pragma once
5-
64
// IWYU pragma: private, include "db.h"
75

86
// Provide overloads of std::less for all instantiable, dbObject-derived types.
@@ -14,9 +12,6 @@
1412

1513
#include <functional>
1614

17-
// This is needed just for clang-tidy. Normally people will not include
18-
// this header directly; they will include db.h and get this indirectly.
19-
#include "odb/db.h"
2015
#include "odb/dbObject.h"
2116

2217
namespace odb {

src/odb/src/codeGenerator/gen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,13 +390,13 @@ def generate(schema, env, includeDir, srcDir, keep_empty):
390390
with open(out_file, "w", encoding="ascii") as file:
391391
file.write(text)
392392

393-
includes = ["db.h", "dbObject.h", "dbCompare.h"]
393+
includes = ["db.h", "dbObject.h", "dbCompare.inc"]
394394
for template_file in [
395395
"db.h",
396396
"dbObject.h",
397397
"CMakeLists.txt",
398398
"dbObject.cpp",
399-
"dbCompare.h",
399+
"dbCompare.inc",
400400
]:
401401
template = env.get_template(template_file)
402402
text = template.render(schema=schema)
File renamed without changes.

src/pad/src/RDLRoute.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
#include "boost/geometry/geometry.hpp"
1313
#include "odb/db.h"
14-
#include "odb/dbCompare.h"
1514
#include "odb/geom.h"
1615
#include "odb/geom_boost.h"
1716

src/psm/include/psm/pdnsim.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
#include <optional>
99
#include <string>
1010

11+
#include "odb/db.h"
1112
#include "odb/dbBlockCallBackObj.h"
12-
#include "odb/dbCompare.h"
1313

1414
namespace odb {
1515
class dbDatabase;

0 commit comments

Comments
 (0)