Skip to content

Commit

Permalink
NetworkReader::deleteLibrary
Browse files Browse the repository at this point in the history
Signed-off-by: James Cherry <[email protected]>
  • Loading branch information
jjcherry56 committed Aug 13, 2021
1 parent 723fb68 commit 21ec025
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/sta/ConcreteNetwork.hh
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ public:
const char *filename);
virtual LibertyLibrary *makeLibertyLibrary(const char *name,
const char *filename);
virtual void deleteLibrary(Library *library);
virtual Cell *makeCell(Library *library,
const char *name,
bool is_leaf,
Expand Down Expand Up @@ -238,7 +239,6 @@ public:

protected:
void addLibrary(ConcreteLibrary *library);
void deleteLibrary(ConcreteLibrary *library);
void setName(const char *name);
void clearConstantNets();
virtual void visitConnectedPins(const Net *net,
Expand Down
1 change: 1 addition & 0 deletions include/sta/Network.hh
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ public:
virtual void setLinkFunc(LinkNetworkFunc *link) = 0;
virtual Library *makeLibrary(const char *name,
const char *filename) = 0;
virtual void deleteLibrary(Library *library) = 0;
// Search the libraries in read order for a cell by name.
virtual Cell *findAnyCell(const char *name) = 0;
virtual Cell *makeCell(Library *library,
Expand Down
9 changes: 5 additions & 4 deletions network/ConcreteNetwork.cc
Original file line number Diff line number Diff line change
Expand Up @@ -437,11 +437,12 @@ ConcreteNetwork::findLibrary(const char *name)
}

void
ConcreteNetwork::deleteLibrary(ConcreteLibrary *library)
ConcreteNetwork::deleteLibrary(Library *library)
{
library_map_.erase(library->name());
library_seq_.eraseObject(library);
delete library;
ConcreteLibrary *clib = reinterpret_cast<ConcreteLibrary*>(library);
library_map_.erase(clib->name());
library_seq_.eraseObject(clib);
delete clib;
}

const char *
Expand Down

0 comments on commit 21ec025

Please sign in to comment.