Skip to content

Comments

IWYU: Fix includes in generated code#9523

Merged
maliberty merged 3 commits intoThe-OpenROAD-Project:masterfrom
hzeller:feature-20260223-gen-inc2
Feb 23, 2026
Merged

IWYU: Fix includes in generated code#9523
maliberty merged 3 commits intoThe-OpenROAD-Project:masterfrom
hzeller:feature-20260223-gen-inc2

Conversation

@hzeller
Copy link
Collaborator

@hzeller hzeller commented Feb 23, 2026

After adding a few //User Code Begin Includes ( df19043 ), and making sure to only insert missing headers there, the codegen files are now IWYU fixed ( 2104967 )

Preparation to IWYU add the needed includes.

Signed-off-by: Henner Zeller <h.zeller@acm.org>
Breakdown:
```
src/cts/src/TritonCTS.cpp:               #include "sta/NetworkClass.hh" for sta::LibertyLibraryIterator
src/est/include/est/EstimateParasitics.h: #include <unordered_set> for std::unordered_set
src/odb/src/db/dbAccessPoint.cpp:        #include "odb/geom.h" for odb::Point
src/odb/src/db/dbAccessPoint.cpp:        #include <utility> for std::move
src/odb/src/db/dbBusPort.cpp:            #include "odb/dbSet.h" for odb::dbSet
src/odb/src/db/dbBusPort.h:              #include <cmath> for (std::)?abs
src/odb/src/db/dbChip.cpp:               #include "odb/dbStream.h" for odb::dbOStreamScope
src/odb/src/db/dbChip.cpp:               #include "utl/Logger.h" for utl::ODB
src/odb/src/db/dbChip.h:                 #include "odb/dbObject.h" for odb::dbObjectType
src/odb/src/db/dbChipBump.cpp:           #include "utl/Logger.h" for utl::ODB
src/odb/src/db/dbChipBumpInstItr.cpp:    #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbChipConn.cpp:           #include "utl/Logger.h" for utl::ODB
src/odb/src/db/dbChipConnItr.cpp:        #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbChipInst.cpp:           #include "odb/dbSet.h" for odb::dbSet
src/odb/src/db/dbChipInst.cpp:           #include "odb/dbTypes.h" for odb::dbOrientType3D
src/odb/src/db/dbChipInst.cpp:           #include "utl/Logger.h" for utl::ODB
src/odb/src/db/dbChipInstItr.cpp:        #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbChipNet.cpp:            #include "utl/Logger.h" for utl::ODB
src/odb/src/db/dbChipNetItr.cpp:         #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbChipRegion.cpp:         #include "odb/dbObject.h" for odb::dbObjectType
src/odb/src/db/dbChipRegion.h:           #include "odb/dbObject.h" for odb::dbObjectType
src/odb/src/db/dbChipRegionInst.cpp:     #include "odb/dbSet.h" for odb::dbSet
src/odb/src/db/dbChipRegionInstItr.cpp:  #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbDatabase.h:             #include "odb/dbObject.h" for odb::dbObjectType
src/odb/src/db/dbDft.cpp:                #include "odb/dbObject.h" for odb::dbObjectType
src/odb/src/db/dbDft.h:                  #include "odb/dbObject.h" for odb::dbObjectType
src/odb/src/db/dbGCellGrid.cpp:          #include "odb/dbTypes.h" for odb::dbTechLayerDir
src/odb/src/db/dbGCellGrid.cpp:          #include <iterator> for std::distance
src/odb/src/db/dbGCellGrid.cpp:          #include <utility> for std::move
src/odb/src/db/dbGCellGrid.cpp:          #include <vector> for std::vector
src/odb/src/db/dbGDSARef.cpp:            #include "odb/geom.h" for odb::Point
src/odb/src/db/dbGDSARef.h:              #include "odb/dbTypes.h" for odb::dbGDSSTrans
src/odb/src/db/dbGDSARef.h:              #include "odb/geom.h" for odb::Point
src/odb/src/db/dbGDSBoundary.cpp:        #include "dbGDSStructure.h" for odb::_dbGDSStructure
src/odb/src/db/dbGDSBoundary.cpp:        #include "odb/geom.h" for odb::Point
src/odb/src/db/dbGDSBoundary.h:          #include "odb/geom.h" for odb::Point
src/odb/src/db/dbGDSBox.cpp:             #include "dbGDSStructure.h" for odb::_dbGDSStructure
src/odb/src/db/dbGDSBox.cpp:             #include "odb/geom.h" for odb::Rect
src/odb/src/db/dbGDSBox.h:               #include "odb/geom.h" for odb::Rect
src/odb/src/db/dbGDSPath.cpp:            #include "dbGDSStructure.h" for odb::_dbGDSStructure
src/odb/src/db/dbGDSPath.h:              #include "odb/geom.h" for odb::Point
src/odb/src/db/dbGDSSRef.cpp:            #include "odb/geom.h" for odb::Point
src/odb/src/db/dbGDSSRef.h:              #include "odb/dbTypes.h" for odb::dbGDSSTrans
src/odb/src/db/dbGDSSRef.h:              #include "odb/geom.h" for odb::Point
src/odb/src/db/dbGDSStructure.cpp:       #include "odb/dbObject.h" for odb::dbObjectType
src/odb/src/db/dbGDSStructure.h:         #include "odb/dbObject.h" for odb::dbObjectType
src/odb/src/db/dbGDSText.cpp:            #include "dbGDSStructure.h" for odb::_dbGDSStructure
src/odb/src/db/dbGDSText.cpp:            #include "odb/geom.h" for odb::Point
src/odb/src/db/dbGDSText.h:              #include "odb/dbTypes.h" for odb::dbGDSSTrans
src/odb/src/db/dbGDSText.h:              #include "odb/geom.h" for odb::Point
src/odb/src/db/dbGlobalConnect.cpp:      #include "dbBlock.h" for odb::_dbBlock
src/odb/src/db/dbGlobalConnect.cpp:      #include "odb/dbSet.h" for odb::dbSet
src/odb/src/db/dbGlobalConnect.cpp:      #include <map> for std::map
src/odb/src/db/dbGlobalConnect.cpp:      #include <set> for std::set
src/odb/src/db/dbGlobalConnect.cpp:      #include <vector> for std::vector
src/odb/src/db/dbGroup.cpp:              #include "dbVector.h" for odb::dbVector
src/odb/src/db/dbGroup.cpp:              #include "odb/dbSet.h" for odb::dbSet
src/odb/src/db/dbGroup.cpp:              #include "odb/dbTypes.h" for odb::dbGroupType
src/odb/src/db/dbGroupInstItr.cpp:       #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbGroupItr.cpp:           #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbGroupModInstItr.cpp:    #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbGuide.cpp:              #include "odb/dbObject.h" for odb::dbGuideObj
src/odb/src/db/dbGuide.cpp:              #include "odb/dbSet.h" for odb::dbSet
src/odb/src/db/dbGuide.cpp:              #include "odb/geom.h" for odb::Rect
src/odb/src/db/dbGuideItr.cpp:           #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbIsolation.cpp:          #include "odb/dbTypes.h" for odb::dbIoType
src/odb/src/db/dbIsolation.cpp:          #include <vector> for std::vector
src/odb/src/db/dbLevelShifter.cpp:       #include <utility> for std::make_pair
src/odb/src/db/dbLevelShifter.cpp:       #include <vector> for std::vector
src/odb/src/db/dbLevelShifter.h:         #include <utility> for std::pair
src/odb/src/db/dbMarker.cpp:             #include "odb/geom.h" for odb::Point
src/odb/src/db/dbMarker.cpp:             #include "utl/Logger.h" for utl::ODB
src/odb/src/db/dbMarker.cpp:             #include <fstream> for std::ofstream
src/odb/src/db/dbMarker.cpp:             #include <set> for std::set
src/odb/src/db/dbMarker.cpp:             #include <variant> for std::holds_alternative
src/odb/src/db/dbMarker.cpp:             #include <vector> for std::vector
src/odb/src/db/dbMarker.h:               #include "odb/dbObject.h" for odb::dbObjectType
src/odb/src/db/dbMarkerCategory.cpp:     #include "utl/Logger.h" for utl::ODB
src/odb/src/db/dbMarkerCategory.cpp:     #include <set> for std::set
src/odb/src/db/dbMarkerCategory.cpp:     #include <stdexcept> for std::invalid_argument
src/odb/src/db/dbMarkerCategory.h:       #include "odb/dbObject.h" for odb::dbObjectType
src/odb/src/db/dbModITerm.cpp:           #include "odb/dbObject.h" for odb::dbModITermObj
src/odb/src/db/dbModITerm.cpp:           #include "odb/dbSet.h" for odb::dbSet
src/odb/src/db/dbModInst.h:              #include <string> for std::string
src/odb/src/db/dbModInst.h:              #include <unordered_map> for std::unordered_map
src/odb/src/db/dbModNet.cpp:             #include <functional> for std::function
src/odb/src/db/dbModule.cpp:             #include "odb/dbObject.h" for odb::dbModuleObj
src/odb/src/db/dbModule.cpp:             #include "odb/dbSet.h" for odb::dbSet
src/odb/src/db/dbModuleBusPortModBTermItr.cpp: #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbModuleInstItr.cpp:      #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbModuleModBTermItr.cpp:  #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbModuleModInstItr.cpp:   #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbModuleModInstModITermItr.cpp: #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbModuleModNetBTermItr.cpp: #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbModuleModNetITermItr.cpp: #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbModuleModNetItr.cpp:    #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbModuleModNetModBTermItr.cpp: #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbModuleModNetModITermItr.cpp: #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbModulePortItr.cpp:      #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbNetTrack.cpp:           #include "odb/dbSet.h" for odb::dbSet
src/odb/src/db/dbNetTrack.cpp:           #include "odb/geom.h" for odb::Rect
src/odb/src/db/dbNetTrackItr.cpp:        #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbPolygon.cpp:            #include "odb/dbSet.h" for odb::dbSet
src/odb/src/db/dbPolygon.cpp:            #include "odb/dbTypes.h" for odb::dbBoxOwner
src/odb/src/db/dbPolygon.cpp:            #include "odb/geom.h" for odb::Point
src/odb/src/db/dbPolygon.cpp:            #include <vector> for std::vector
src/odb/src/db/dbPolygon.h:              #include <vector> for std::vector
src/odb/src/db/dbPowerDomain.h:          #include <string> for std::string
src/odb/src/db/dbPowerSwitch.cpp:        #include "dbVector.h" for odb::dbVector
src/odb/src/db/dbPowerSwitch.cpp:        #include <vector> for std::vector
src/odb/src/db/dbProperty.cpp:           #include "odb/dbObject.h" for odb::dbObjectType
src/odb/src/db/dbProperty.cpp:           #include "odb/dbSet.h" for odb::dbSet
src/odb/src/db/dbProperty.cpp:           #include <cassert> for assert
src/odb/src/db/dbProperty.cpp:           #include <cstdlib> for free
src/odb/src/db/dbProperty.h:             #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbRegionGroupItr.cpp:     #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbScanChain.cpp:          #include "odb/dbObject.h" for odb::dbObjectType
src/odb/src/db/dbScanChain.cpp:          #include <string_view> for std::string_view
src/odb/src/db/dbScanChain.cpp:          #include <variant> for std::variant
src/odb/src/db/dbScanChain.h:            #include "odb/db.h" for odb::dbBTerm
src/odb/src/db/dbScanChain.h:            #include "odb/dbObject.h" for odb::dbObjectType
src/odb/src/db/dbScanChain.h:            #include <variant> for std::variant
src/odb/src/db/dbScanInst.cpp:           #include "dbBlock.h" for odb::_dbBlock
src/odb/src/db/dbScanInst.cpp:           #include <string_view> for std::string_view
src/odb/src/db/dbScanInst.cpp:           #include <variant> for std::variant
src/odb/src/db/dbScanList.cpp:           #include "dbBlock.h" for odb::_dbBlock
src/odb/src/db/dbScanList.cpp:           #include "odb/dbSet.h" for odb::dbSet
src/odb/src/db/dbScanListScanInstItr.cpp: #include "odb/dbObject.h" for odb::dbObject
src/odb/src/db/dbScanPartition.cpp:      #include "odb/dbObject.h" for odb::dbObjectType
src/odb/src/db/dbScanPartition.h:        #include "odb/dbObject.h" for odb::dbObjectType
src/odb/src/db/dbScanPin.cpp:            #include <type_traits> for std::decay_t
src/odb/src/db/dbTechLayer.cpp:          #include "dbVector.h" for odb::dbVector
src/odb/src/db/dbTechLayer.cpp:          #include "odb/dbTypes.h" for odb::dbTechLayerType
src/odb/src/db/dbTechLayer.cpp:          #include <algorithm> for std::max
src/odb/src/db/dbTechLayer.cpp:          #include <iterator> for std::distance
src/odb/src/db/dbTechLayer.cpp:          #include <ranges> for std::ranges::.*
src/odb/src/db/dbTechLayer.cpp:          #include <string> for std::string
src/odb/src/db/dbTechLayer.h:            #include "odb/dbId.h" for odb::dbId
src/odb/src/db/dbTechLayer.h:            #include "odb/dbObject.h" for odb::dbObjectType
src/odb/src/db/dbTechLayerCornerSpacingRule.cpp: #include <vector> for std::vector
src/odb/src/db/dbTechLayerCutSpacingTableDefRule.cpp: #include "dbVector.h" for odb::dbVector
src/odb/src/db/dbTechLayerCutSpacingTableDefRule.cpp: #include <algorithm> for std::max
src/odb/src/db/dbTechLayerCutSpacingTableDefRule.cpp: #include <utility> for std::pair
src/odb/src/db/dbTechLayerCutSpacingTableDefRule.cpp: #include <vector> for std::vector
src/odb/src/db/dbTechLayerCutSpacingTableDefRule.h: #include <utility> for std::pair
src/odb/src/db/dbTechLayerCutSpacingTableOrthRule.h: #include <utility> for std::pair
src/odb/src/db/dbTechLayerEolExtensionRule.cpp: #include <utility> for std::pair
src/odb/src/db/dbTechLayerEolExtensionRule.cpp: #include <vector> for std::vector
src/odb/src/db/dbTechLayerEolExtensionRule.h: #include <utility> for std::pair
src/odb/src/db/dbTechLayerSpacingTablePrlRule.cpp: #include "dbVector.h" for odb::dbVector
src/odb/src/db/dbTechLayerSpacingTablePrlRule.cpp: #include <algorithm> for std::max
src/odb/src/db/dbTechLayerSpacingTablePrlRule.cpp: #include <iterator> for std::distance
src/odb/src/db/dbTechLayerSpacingTablePrlRule.cpp: #include <map> for std::map
src/odb/src/db/dbTechLayerSpacingTablePrlRule.cpp: #include <ranges> for std::ranges::.*
src/odb/src/db/dbTechLayerSpacingTablePrlRule.cpp: #include <utility> for std::pair
src/odb/src/db/dbTechLayerSpacingTablePrlRule.cpp: #include <vector> for std::vector
src/odb/src/db/dbTechLayerWidthTableRule.cpp: #include <vector> for std::vector
src/odb/src/db/dbTechLayerWrongDirSpacingRule.h: #include "odb/dbId.h" for odb::dbId
src/rmp/src/annealing_strategy.cpp:      #include "sta/Transition.hh" for sta::RiseFallBoth
```

Signed-off-by: Henner Zeller <h.zeller@acm.org>
Signed-off-by: Henner Zeller <h.zeller@acm.org>
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses 'Include What You Use' (IWYU) issues by adding necessary #include directives across numerous generated files. The changes are consistent and well-organized, improving the project's include hygiene. The added headers appear correct and necessary for the code they are in. This is a valuable cleanup effort.

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@maliberty maliberty merged commit de13f58 into The-OpenROAD-Project:master Feb 23, 2026
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants