Skip to content

Commit 0a9cb38

Browse files
committed
Removed dbInst::getHierarchicalName()
- It will be added later when `_dbInst::_name` contains a base name. Signed-off-by: Jaehyun Kim <[email protected]>
1 parent c1a5163 commit 0a9cb38

File tree

2 files changed

+4
-33
lines changed

2 files changed

+4
-33
lines changed

src/odb/include/odb/db.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,12 +1756,12 @@ class dbNet : public dbObject
17561756
{
17571757
public:
17581758
///
1759-
/// Get the hierarchical net name.
1759+
/// Get the hierarchical net name (not a base name).
17601760
///
17611761
std::string getName() const;
17621762

17631763
///
1764-
/// Get the net name.
1764+
/// Need a version that does not do strdup every time
17651765
///
17661766
const char* getConstName() const;
17671767

@@ -2534,15 +2534,10 @@ class dbInst : public dbObject
25342534
{
25352535
public:
25362536
///
2537-
/// Get the instance name.
2537+
/// Get the hierarchical instance name (not a base name).
25382538
///
25392539
std::string getName() const;
25402540

2541-
///
2542-
/// Get the hierarchical instance name.
2543-
///
2544-
std::string getHierarchicalName() const;
2545-
25462541
///
25472542
/// Need a version that does not do strdup every time
25482543
///

src/odb/src/db/dbInst.cpp

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -346,30 +346,6 @@ std::string dbInst::getName() const
346346
return inst->_name;
347347
}
348348

349-
std::string dbInst::getHierarchicalName() const
350-
{
351-
_dbInst* inst = (_dbInst*) this;
352-
if (inst->_module == 0) {
353-
return inst->_name;
354-
}
355-
356-
dbBlock* block = getBlock();
357-
_dbBlock* block_impl = (_dbBlock*) block;
358-
_dbModule* module = block_impl->_module_tbl->getPtr(inst->_module);
359-
if (module->_mod_inst == 0) { // top module
360-
return inst->_name;
361-
}
362-
363-
_dbModInst* mod_inst_impl
364-
= block_impl->_modinst_tbl->getPtr(module->_mod_inst);
365-
dbModInst* mod_inst = (dbModInst*) mod_inst_impl;
366-
// A non-null mod_inst is expected for non-top modules.
367-
// The hierarchical name is constructed by prepending the parent module
368-
// instance's hierarchical name and the delimiter.
369-
return mod_inst->getHierarchicalName() + block->getHierarchyDelimiter()
370-
+ inst->_name;
371-
}
372-
373349
const char* dbInst::getConstName() const
374350
{
375351
_dbInst* inst = (_dbInst*) this;
@@ -1547,7 +1523,7 @@ void dbInst::destroy(dbInst* inst_)
15471523
"ECO: delete dbInst({}, {:p}) '{}'",
15481524
inst->getId(),
15491525
static_cast<void*>(inst),
1550-
inst_->getHierarchicalName());
1526+
inst_->getName());
15511527
auto master = inst_->getMaster();
15521528
block->_journal->beginAction(dbJournal::DELETE_OBJECT);
15531529
block->_journal->pushParam(dbInstObj);

0 commit comments

Comments
 (0)