diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e548733..99a94864 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -234,7 +234,6 @@ set(STA_SOURCE util/RiseFallMinMaxDelay.cc util/RiseFallValues.cc util/Stats.cc - util/StringSet.cc util/StringUtil.cc util/Transition.cc diff --git a/include/sta/Sdc.hh b/include/sta/Sdc.hh index dfd9aced..add84e7f 100644 --- a/include/sta/Sdc.hh +++ b/include/sta/Sdc.hh @@ -30,7 +30,6 @@ #include #include "StringUtil.hh" -#include "StringSet.hh" #include "MinMax.hh" #include "StaState.hh" #include "NetworkClass.hh" diff --git a/include/sta/SearchClass.hh b/include/sta/SearchClass.hh index 65683966..c8f45627 100644 --- a/include/sta/SearchClass.hh +++ b/include/sta/SearchClass.hh @@ -29,7 +29,6 @@ #include #include "VectorMap.hh" -#include "StringSet.hh" #include "MinMaxValues.hh" #include "Delay.hh" #include "NetworkClass.hh" diff --git a/include/sta/StringSet.hh b/include/sta/StringSet.hh deleted file mode 100644 index fc3d0d2b..00000000 --- a/include/sta/StringSet.hh +++ /dev/null @@ -1,38 +0,0 @@ -// OpenSTA, Static Timing Analyzer -// Copyright (c) 2025, Parallax Software, Inc. -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -// -// The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. -// -// Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// -// This notice may not be removed or altered from any source distribution. -#pragma once - -#include - -#include "StringUtil.hh" - -namespace sta { - -using StringSet = std::set; -using StdStringSet = std::set; - -void -deleteContents(StringSet *strings); - -} // namespace diff --git a/include/sta/StringUtil.hh b/include/sta/StringUtil.hh index cdb9b1b7..9b67ca4c 100644 --- a/include/sta/StringUtil.hh +++ b/include/sta/StringUtil.hh @@ -28,12 +28,14 @@ #include #include #include +#include #include "Machine.hh" // __attribute__ namespace sta { using StdStringSeq = std::vector; +using StdStringSet = std::set; inline bool stringEq(const char *str1, diff --git a/include/sta/TclTypeHelpers.hh b/include/sta/TclTypeHelpers.hh index 33d837d3..657aa018 100644 --- a/include/sta/TclTypeHelpers.hh +++ b/include/sta/TclTypeHelpers.hh @@ -22,20 +22,17 @@ // // This notice may not be removed or altered from any source distribution. -#include "ArcDelayCalc.hh" -#include "StringSet.hh" - #include +#include "ArcDelayCalc.hh" +#include "StringUtil.hh" + namespace sta { #if TCL_MAJOR_VERSION < 9 typedef int Tcl_Size; #endif -StringSet * -tclListSetConstChar(Tcl_Obj *const source, - Tcl_Interp *interp); StdStringSeq tclListSeqStdString(Tcl_Obj *const source, Tcl_Interp *interp); diff --git a/include/sta/VerilogReader.hh b/include/sta/VerilogReader.hh index 2b244d0c..cf1dab95 100644 --- a/include/sta/VerilogReader.hh +++ b/include/sta/VerilogReader.hh @@ -28,7 +28,7 @@ #include #include -#include "StringSet.hh" +#include "StringUtil.hh" #include "NetworkClass.hh" namespace sta { diff --git a/liberty/Liberty.cc b/liberty/Liberty.cc index 23774ac1..825502f6 100644 --- a/liberty/Liberty.cc +++ b/liberty/Liberty.cc @@ -31,7 +31,6 @@ #include "Debug.hh" #include "Error.hh" #include "StringUtil.hh" -#include "StringSet.hh" #include "PatternMatch.hh" #include "Units.hh" #include "Transition.hh" diff --git a/spice/WritePathSpice.hh b/spice/WritePathSpice.hh index 647ef542..c8823aeb 100644 --- a/spice/WritePathSpice.hh +++ b/spice/WritePathSpice.hh @@ -24,7 +24,6 @@ #pragma once -#include "StringSet.hh" #include "CircuitSim.hh" namespace sta { diff --git a/spice/WriteSpice.hh b/spice/WriteSpice.hh index 81bd15b7..eb10fcfe 100644 --- a/spice/WriteSpice.hh +++ b/spice/WriteSpice.hh @@ -30,7 +30,6 @@ #include #include "StaState.hh" -#include "StringSet.hh" #include "StringUtil.hh" #include "Liberty.hh" #include "GraphClass.hh" diff --git a/tcl/StaTclTypes.i b/tcl/StaTclTypes.i index 7de25386..2c63941e 100644 --- a/tcl/StaTclTypes.i +++ b/tcl/StaTclTypes.i @@ -27,7 +27,6 @@ #include "Machine.hh" #include "StringUtil.hh" -#include "StringSet.hh" #include "PatternMatch.hh" #include "Network.hh" #include "Liberty.hh" @@ -1227,10 +1226,6 @@ using namespace sta; Tcl_SetObjResult(interp,Tcl_NewDoubleObj(delayAsFloat($1))); } -%typemap(in) StringSet* { - $1 = tclListSetConstChar($input, interp); -} - %typemap(out) Mode* { const Mode *mode = $1; if (mode) diff --git a/tcl/TclTypeHelpers.cc b/tcl/TclTypeHelpers.cc index adf21f62..36e606fa 100644 --- a/tcl/TclTypeHelpers.cc +++ b/tcl/TclTypeHelpers.cc @@ -30,26 +30,6 @@ namespace sta { -StringSet * -tclListSetConstChar(Tcl_Obj *const source, - Tcl_Interp *interp) -{ - Tcl_Size argc; - Tcl_Obj **argv; - - if (Tcl_ListObjGetElements(interp, source, &argc, &argv) == TCL_OK) { - StringSet *set = new StringSet; - for (int i = 0; i < argc; i++) { - int length; - const char *str = Tcl_GetStringFromObj(argv[i], &length); - set->insert(str); - } - return set; - } - else - return nullptr; -} - StdStringSeq tclListSeqStdString(Tcl_Obj *const source, Tcl_Interp *interp) diff --git a/util/StringSet.cc b/util/StringSet.cc deleted file mode 100644 index 79863547..00000000 --- a/util/StringSet.cc +++ /dev/null @@ -1,36 +0,0 @@ -// OpenSTA, Static Timing Analyzer -// Copyright (c) 2025, Parallax Software, Inc. -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -// -// The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. -// -// Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// -// This notice may not be removed or altered from any source distribution. - -#include "StringSet.hh" - -namespace sta { - -void -deleteContents(StringSet *strings) -{ - for (const char *string : *strings) - stringDelete(string); -} - -} // namespace