diff --git a/CMakeLists.txt b/CMakeLists.txt index 973cfb0d..4e548733 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -234,7 +234,6 @@ set(STA_SOURCE util/RiseFallMinMaxDelay.cc util/RiseFallValues.cc util/Stats.cc - util/StringSeq.cc util/StringSet.cc util/StringUtil.cc util/Transition.cc diff --git a/graph/Graph.i b/graph/Graph.i index 289ca3ba..4eab5270 100644 --- a/graph/Graph.i +++ b/graph/Graph.i @@ -229,12 +229,12 @@ arc_delays(TimingArc *arc) return delays; } -StringSeq +StdStringSeq arc_delay_strings(TimingArc *arc, int digits) { Sta *sta = Sta::sta(); - StringSeq delays; + StdStringSeq delays; DcalcAPIndex ap_count = sta->dcalcAnalysisPtCount(); for (DcalcAPIndex ap_index = 0; ap_index < ap_count; ap_index++) delays.push_back(delayAsString(sta->arcDelay(self, arc, ap_index), diff --git a/include/sta/Scene.hh b/include/sta/Scene.hh index 9b2e61a0..28986377 100644 --- a/include/sta/Scene.hh +++ b/include/sta/Scene.hh @@ -28,7 +28,6 @@ #include #include -#include "StringSeq.hh" #include "GraphClass.hh" #include "SearchClass.hh" diff --git a/include/sta/Sta.hh b/include/sta/Sta.hh index 483b3a00..f8fe4a95 100644 --- a/include/sta/Sta.hh +++ b/include/sta/Sta.hh @@ -29,7 +29,6 @@ #include #include -#include "StringSeq.hh" #include "StringUtil.hh" #include "LibertyClass.hh" #include "NetworkClass.hh" @@ -126,7 +125,7 @@ public: void setThreadCount(int thread_count); // define_corners compatibility. - void makeScenes(StringSeq *scene_names); + void makeScenes(StdStringSeq *scene_names); void makeScene(const std::string &name, const std::string &mode_name, const StdStringSeq &liberty_min_files, @@ -976,7 +975,7 @@ public: bool clk_gating_setup, bool clk_gating_hold); void setReportPathFormat(ReportPathFormat format); - void setReportPathFieldOrder(StringSeq *field_names); + void setReportPathFieldOrder(StdStringSeq *field_names); void setReportPathFields(bool report_input_pin, bool report_hier_pins, bool report_net, diff --git a/include/sta/StringSeq.hh b/include/sta/StringSeq.hh deleted file mode 100644 index 9821b7b2..00000000 --- a/include/sta/StringSeq.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 StringSeq = std::vector; - -void -deleteContents(StringSeq *strings); - -} // namespace diff --git a/include/sta/TclTypeHelpers.hh b/include/sta/TclTypeHelpers.hh index e521c4a9..33d837d3 100644 --- a/include/sta/TclTypeHelpers.hh +++ b/include/sta/TclTypeHelpers.hh @@ -24,7 +24,6 @@ #include "ArcDelayCalc.hh" #include "StringSet.hh" -#include "StringSeq.hh" #include @@ -37,11 +36,6 @@ namespace sta { StringSet * tclListSetConstChar(Tcl_Obj *const source, Tcl_Interp *interp); - -StringSeq * -tclListSeqConstChar(Tcl_Obj *const source, - Tcl_Interp *interp); - StdStringSeq tclListSeqStdString(Tcl_Obj *const source, Tcl_Interp *interp); diff --git a/sdc/Sdc.i b/sdc/Sdc.i index 2bca70b0..328abb32 100644 --- a/sdc/Sdc.i +++ b/sdc/Sdc.i @@ -1580,12 +1580,12 @@ filter_timing_arcs(const char *property, //////////////////////////////////////////////////////////////// -StringSeq +StdStringSeq group_path_names() { Sta *sta = Sta::sta(); Sdc *sdc = sta->cmdSdc(); - StringSeq pg_names; + StdStringSeq pg_names; for (auto const& [name, group] : sdc->groupPaths()) pg_names.push_back(name); return pg_names; diff --git a/search/ReportPath.cc b/search/ReportPath.cc index ad9b9f11..4029d09d 100644 --- a/search/ReportPath.cc +++ b/search/ReportPath.cc @@ -211,15 +211,15 @@ ReportPath::findField(const char *name) const } void -ReportPath::setReportFieldOrder(StringSeq *field_names) +ReportPath::setReportFieldOrder(StdStringSeq *field_names) { // Disable all fields. for (ReportField *field : fields_) field->setEnabled(false); ReportFieldSeq next_fields; - for (const char *field_name : *field_names) { - ReportField *field = findField(field_name); + for (const std::string &field_name : *field_names) { + ReportField *field = findField(field_name.c_str()); if (field) { next_fields.push_back(field); field->setEnabled(true); diff --git a/search/ReportPath.hh b/search/ReportPath.hh index 39c8b1a5..8c61e356 100644 --- a/search/ReportPath.hh +++ b/search/ReportPath.hh @@ -27,7 +27,7 @@ #include #include -#include "StringSeq.hh" +#include "StringUtil.hh" #include "SearchClass.hh" #include "PathEnd.hh" #include "CheckMinPulseWidths.hh" @@ -49,7 +49,7 @@ public: virtual ~ReportPath(); ReportPathFormat pathFormat() const { return format_; } void setPathFormat(ReportPathFormat format); - void setReportFieldOrder(StringSeq *field_names); + void setReportFieldOrder(StdStringSeq *field_names); void setReportFields(bool report_input_pin, bool report_hier_pins, bool report_net, diff --git a/search/Search.i b/search/Search.i index 8ffff0ff..f6ec25b4 100644 --- a/search/Search.i +++ b/search/Search.i @@ -395,7 +395,7 @@ set_report_path_format(ReportPathFormat format) } void -set_report_path_field_order(StringSeq *field_names) +set_report_path_field_order(StdStringSeq *field_names) { Sta::sta()->setReportPathFieldOrder(field_names); delete field_names; @@ -753,7 +753,7 @@ define_scene_cmd(const char *name, } void -define_scenes_cmd(StringSeq *scene_names) +define_scenes_cmd(StdStringSeq *scene_names) { Sta *sta = Sta::sta(); sta->makeScenes(scene_names); diff --git a/search/Sta.cc b/search/Sta.cc index 98fdbbf3..9bde46bc 100644 --- a/search/Sta.cc +++ b/search/Sta.cc @@ -2450,7 +2450,7 @@ void Sta::makeDefaultScene() { const char *name = "default"; - StringSeq scene_names; + StdStringSeq scene_names; scene_names.push_back(name); Parasitics *parasitics = makeConcreteParasitics(name, ""); @@ -2468,7 +2468,7 @@ Sta::makeDefaultScene() // define_corners (before read_liberty). void -Sta::makeScenes(StringSeq *scene_names) +Sta::makeScenes(StdStringSeq *scene_names) { if (scene_names->size() > scene_count_max) report_->error(1553, "maximum scene count exceeded"); @@ -2478,7 +2478,7 @@ Sta::makeScenes(StringSeq *scene_names) mode->clear(); deleteScenes(); - for (const char *name : *scene_names) + for (const std::string &name : *scene_names) makeScene(name, mode, parasitics); cmd_scene_ = scenes_[0]; @@ -2729,7 +2729,7 @@ Sta::setReportPathFormat(ReportPathFormat format) } void -Sta::setReportPathFieldOrder(StringSeq *field_names) +Sta::setReportPathFieldOrder(StdStringSeq *field_names) { report_path_->setReportFieldOrder(field_names); } diff --git a/tcl/StaTclTypes.i b/tcl/StaTclTypes.i index b1c7b288..7d47632d 100644 --- a/tcl/StaTclTypes.i +++ b/tcl/StaTclTypes.i @@ -28,7 +28,6 @@ #include "Machine.hh" #include "StringUtil.hh" #include "StringSet.hh" -#include "StringSeq.hh" #include "PatternMatch.hh" #include "Network.hh" #include "Liberty.hh" @@ -306,7 +305,7 @@ using namespace sta; } %typemap(in) StdStringSeq* { - $1 = tclListSeqStdString($input, interp); + $1 = tclListSeqStdStringPtr($input, interp); } %typemap(out) StringSeq* { diff --git a/tcl/TclTypeHelpers.cc b/tcl/TclTypeHelpers.cc index c5cc219d..adf21f62 100644 --- a/tcl/TclTypeHelpers.cc +++ b/tcl/TclTypeHelpers.cc @@ -50,26 +50,6 @@ tclListSetConstChar(Tcl_Obj *const source, return nullptr; } -StringSeq * -tclListSeqConstChar(Tcl_Obj *const source, - Tcl_Interp *interp) -{ - Tcl_Size argc; - Tcl_Obj **argv; - - if (Tcl_ListObjGetElements(interp, source, &argc, &argv) == TCL_OK) { - StringSeq *seq = new StringSeq; - for (int i = 0; i < argc; i++) { - int length; - const char *str = Tcl_GetStringFromObj(argv[i], &length); - seq->push_back(str); - } - return seq; - } - else - return nullptr; -} - StdStringSeq tclListSeqStdString(Tcl_Obj *const source, Tcl_Interp *interp) diff --git a/util/StringSeq.cc b/util/StringSeq.cc deleted file mode 100644 index f5615d6c..00000000 --- a/util/StringSeq.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 "StringSeq.hh" - -namespace sta { - -void -deleteContents(StringSeq *strings) -{ - for (const char *string : *strings) - stringDelete(string); -} - -} // namespace diff --git a/verilog/VerilogReaderPvt.hh b/verilog/VerilogReaderPvt.hh index 6bbe8288..9f1fdffe 100644 --- a/verilog/VerilogReaderPvt.hh +++ b/verilog/VerilogReaderPvt.hh @@ -28,7 +28,6 @@ #include #include -#include "StringSeq.hh" #include "StringUtil.hh" namespace sta {