diff --git a/include/sta/Liberty.hh b/include/sta/Liberty.hh index b7312706..d94110a3 100644 --- a/include/sta/Liberty.hh +++ b/include/sta/Liberty.hh @@ -1089,7 +1089,9 @@ protected: class TestCell : public LibertyCell { public: - TestCell(LibertyCell *cell); + TestCell(LibertyLibrary *library, + const char *name, + const char *filename); protected: }; diff --git a/liberty/Liberty.cc b/liberty/Liberty.cc index b6bb75ac..5c69c36d 100644 --- a/liberty/Liberty.cc +++ b/liberty/Liberty.cc @@ -3159,8 +3159,10 @@ ScaleFactors::print() } } -TestCell::TestCell(LibertyCell *cell) : - LibertyCell(cell->libertyLibrary(), cell->name(), cell->filename()) +TestCell::TestCell(LibertyLibrary *library, + const char *name, + const char *filename) : + LibertyCell(library, name, filename) { } diff --git a/liberty/LibertyReader.cc b/liberty/LibertyReader.cc index 65f5a0ea..7417d012 100644 --- a/liberty/LibertyReader.cc +++ b/liberty/LibertyReader.cc @@ -4747,7 +4747,10 @@ LibertyReader::beginTestCell(LibertyGroup *group) if (cell_ && cell_->testCell()) libWarn(1262, group, "cell %s test_cell redefinition.", cell_->name()); else { - test_cell_ = new TestCell(cell_); + string name = cell_->name(); + name += "/test_cell"; + test_cell_ = new TestCell(cell_->libertyLibrary(), name.c_str(), + cell_->filename()); cell_->setTestCell(test_cell_); // Do a recursive parse of cell into the test_cell because it has