rm StdString
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
8bd938d840
commit
0c36caa182
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
#include <vector>
|
||||
#include <set>
|
||||
|
||||
#include "StringSeq.hh"
|
||||
#include "GraphClass.hh"
|
||||
#include "SearchClass.hh"
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@
|
|||
#include <string_view>
|
||||
#include <functional>
|
||||
|
||||
#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,
|
||||
|
|
|
|||
|
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
// 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 <vector>
|
||||
|
||||
#include "StringUtil.hh"
|
||||
|
||||
namespace sta {
|
||||
|
||||
using StringSeq = std::vector<const char*>;
|
||||
|
||||
void
|
||||
deleteContents(StringSeq *strings);
|
||||
|
||||
} // namespace
|
||||
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include "ArcDelayCalc.hh"
|
||||
#include "StringSet.hh"
|
||||
#include "StringSeq.hh"
|
||||
|
||||
#include <tcl.h>
|
||||
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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* {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
// 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
|
||||
|
|
@ -28,7 +28,6 @@
|
|||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
#include "StringSeq.hh"
|
||||
#include "StringUtil.hh"
|
||||
|
||||
namespace sta {
|
||||
|
|
|
|||
Loading…
Reference in New Issue