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 # Earlier versions of flex use 'register' declarations that are deprecated
# and illegal in c++17. # in c++11 and illegal in c++17.
#find_package(FLEX 2.6.4) #find_package(FLEX 2.6.4)
find_package(FLEX) find_package(FLEX)
find_package(BISON) find_package(BISON)

View File

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

View File

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

View File

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