minor cleanup

This commit is contained in:
James Cherry 2021-02-07 17:33:53 -07:00
parent 56a00d2061
commit aca2c51e96
4 changed files with 11 additions and 16 deletions

View File

@ -237,8 +237,8 @@ set(STA_TCL_FILES
#
################################################################
# Earlier versions of flex use 'register' declarations are deprecated in c++11
# and illegal in c++17.
# Earlier versions of flex use 'register' declarations that are deprecated
# in c++11 and illegal in c++17.
#find_package(FLEX 2.6.4)
find_package(FLEX)
find_package(BISON)

View File

@ -89,18 +89,18 @@ LibertyBuilder::makeBusPortBit(ConcreteLibrary *library,
library->busBrktLeft(),
bit_index,
library->busBrktRight());
ConcretePort *port = makePort(cell, bit_name, bit_index);
LibertyPort *port = makePort(cell, bit_name, bit_index);
bus_port->addPortBit(port);
cell->addPortBit(port);
}
ConcretePort *
LibertyPort *
LibertyBuilder::makePort(LibertyCell *cell,
const char *bit_name,
int bit_index)
{
ConcretePort *port = new LibertyPort(cell, bit_name, false,
bit_index, bit_index, false, nullptr);
LibertyPort *port = new LibertyPort(cell, bit_name, false,
bit_index, bit_index, false, nullptr);
return port;
}

View File

@ -72,9 +72,9 @@ protected:
int from_index,
int to_index);
// Bus port bit (internal to makeBusPortBits).
virtual ConcretePort *makePort(LibertyCell *cell,
const char *bit_name,
int bit_index);
virtual LibertyPort *makePort(LibertyCell *cell,
const char *bit_name,
int bit_index);
void makeBusPortBit(ConcreteLibrary *library,
LibertyCell *cell,
ConcretePort *bus_port,

View File

@ -522,13 +522,8 @@ libertyIncludeBegin(const char *filename)
liberty_filename = filename;
liberty_line = 1;
}
else {
// Copy the filename to the stack so it is deleted when
// libertyParseError throws an error.
string filename1(filename);
stringDelete(filename);
libertyParseError("cannot open include file %s.", filename1.c_str());
}
else
libertyParseError("cannot open include file %s.", filename);
return stream;
}