mirror of
https://github.com/The-OpenROAD-Project/OpenSTA.git
synced 2026-09-06 09:17:17 +02:00
rm tmp string uses
commit 2d0a4f8e9a8b46faa2ba91e1be636c3c3ad95a7f Author: James Cherry <[email protected]> Date: Sat Mar 25 21:25:37 2023 -0700 leaks Signed-off-by: James Cherry <[email protected]> commit 5514910a91707d615bac0bbed3a29f579eca8de2 Author: James Cherry <[email protected]> Date: Sat Mar 25 18:21:54 2023 -0700 foo Signed-off-by: James Cherry <[email protected]> commit 076a51d5816444e883232933c2ded7309291d0bc Author: James Cherry <[email protected]> Date: Sat Mar 25 16:38:42 2023 -0700 parse bus string Signed-off-by: James Cherry <[email protected]> commit 2b80e563cbbb6563a6b716431f391bbb6639f816 Author: James Cherry <[email protected]> Date: Sat Mar 25 15:57:05 2023 -0700 rm tmp string Signed-off-by: James Cherry <[email protected]> commit 9e4f2308658232d0b1ee9efcd948bb19ae5dd30f Author: James Cherry <[email protected]> Date: Sat Mar 25 14:37:35 2023 -0700 rm tmp string Signed-off-by: James Cherry <[email protected]> commit ebad3afd49b08e7194452dd082c3c7c05767f875 Author: James Cherry <[email protected]> Date: Sat Mar 25 10:59:11 2023 -0700 rm tmp string Signed-off-by: James Cherry <[email protected]> commit 69647913932312a04ca06e7a04cca17ed50d4daf Author: James Cherry <[email protected]> Date: Fri Mar 24 21:02:20 2023 -0700 rm tmp string Signed-off-by: James Cherry <[email protected]> commit 55e67996a7b0651dbb5ee06cb89fe0410648c3c1 Author: James Cherry <[email protected]> Date: Sat Mar 25 10:42:43 2023 -0700 rm tmp string Signed-off-by: James Cherry <[email protected]> commit 73cee43925c0d32940989c616440b4da18640121 Author: James Cherry <[email protected]> Date: Sat Mar 25 09:55:17 2023 -0700 rm tmp string Signed-off-by: James Cherry <[email protected]> commit eba6d1413b8d87a64a90141e5263a56eede1df51 Author: James Cherry <[email protected]> Date: Sat Mar 25 09:40:16 2023 -0700 rm tmp string Signed-off-by: James Cherry <[email protected]> commit 95d6ed78144512a37fd7c1d3d8a62fc4c8965818 Author: James Cherry <[email protected]> Date: Sat Mar 25 08:18:46 2023 -0700 rm tmp string Signed-off-by: James Cherry <[email protected]> commit faf82464d7be7fd6c958a21d401fa48ece4ac341 Author: James Cherry <[email protected]> Date: Sat Mar 25 07:49:11 2023 -0700 rm tmp string Signed-off-by: James Cherry <[email protected]> commit cfc9064496cb6f46ec562b104bc7fff2fbc1b32e Author: James Cherry <[email protected]> Date: Sat Mar 25 07:37:12 2023 -0700 rm tmp string Signed-off-by: James Cherry <[email protected]> commit 057933a6ac356a7541883aa64b5109c7a0e8b8d1 Author: James Cherry <[email protected]> Date: Fri Mar 24 21:02:20 2023 -0700 rm tmp string Signed-off-by: James Cherry <[email protected]> commit fdeb6436a72413356a627dd1de1d8cec7fca4c4a Author: James Cherry <[email protected]> Date: Fri Mar 24 19:53:44 2023 -0700 rm TmpString uses Signed-off-by: James Cherry <[email protected]> Signed-off-by: James Cherry <[email protected]>
This commit is contained in:
+20
-9
@@ -210,6 +210,8 @@ SdfReader::interconnect(const char *from_pin_name,
|
||||
sdfWarn(186, "pin %s not found.", to_pin_name);
|
||||
}
|
||||
}
|
||||
stringDelete(from_pin_name);
|
||||
stringDelete(to_pin_name);
|
||||
deleteTripleSeq(triples);
|
||||
}
|
||||
|
||||
@@ -234,6 +236,7 @@ SdfReader::port(const char *to_pin_name,
|
||||
}
|
||||
}
|
||||
}
|
||||
stringDelete(to_pin_name);
|
||||
deleteTripleSeq(triples);
|
||||
}
|
||||
|
||||
@@ -312,6 +315,7 @@ SdfReader::setInstance(const char *instance_name)
|
||||
}
|
||||
else
|
||||
instance_ = nullptr;
|
||||
stringDelete(instance_name);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -399,6 +403,7 @@ SdfReader::iopath(SdfPortSpec *from_edge,
|
||||
}
|
||||
}
|
||||
}
|
||||
stringDelete(to_port_name);
|
||||
deletePortSpec(from_edge);
|
||||
deleteTripleSeq(triples);
|
||||
stringDelete(cond);
|
||||
@@ -688,6 +693,7 @@ SdfReader::device(const char *to_port_name,
|
||||
setDevicePinDelays(to_pin, triples);
|
||||
}
|
||||
}
|
||||
stringDelete(to_port_name);
|
||||
deleteTripleSeq(triples);
|
||||
}
|
||||
|
||||
@@ -822,7 +828,10 @@ SdfReader::makePortSpec(Transition *tr,
|
||||
const char *port,
|
||||
const char *cond)
|
||||
{
|
||||
return new SdfPortSpec(tr, port, cond);
|
||||
SdfPortSpec *port_spec = new SdfPortSpec(tr, port, cond);
|
||||
stringDelete(port);
|
||||
stringDelete(cond);
|
||||
return port_spec;
|
||||
}
|
||||
|
||||
SdfPortSpec *
|
||||
@@ -837,9 +846,9 @@ SdfReader::makeCondPortSpec(const char *cond_port)
|
||||
auto cond_end = cond_port1.find_last_not_of(" ", port_idx);
|
||||
if (cond_end != cond_port1.npos) {
|
||||
string cond1 = cond_port1.substr(0, cond_end + 1);
|
||||
SdfPortSpec *port_spec = makePortSpec(Transition::riseFall(),
|
||||
port1.c_str(),
|
||||
cond1.c_str());
|
||||
SdfPortSpec *port_spec = new SdfPortSpec(Transition::riseFall(),
|
||||
port1.c_str(),
|
||||
cond1.c_str());
|
||||
stringDelete(cond_port);
|
||||
return port_spec;
|
||||
}
|
||||
@@ -919,7 +928,7 @@ SdfReader::unescaped(const char *token)
|
||||
{
|
||||
char path_escape = network_->pathEscape();
|
||||
char path_divider = network_->pathDivider();
|
||||
char *unescaped = makeTmpString(strlen(token) + 1);
|
||||
char *unescaped = new char[strlen(token) + 1];
|
||||
char *u = unescaped;
|
||||
size_t token_length = strlen(token);
|
||||
|
||||
@@ -962,10 +971,12 @@ char *
|
||||
SdfReader::makePath(const char *head,
|
||||
const char *tail)
|
||||
{
|
||||
char *path = stringPrintTmp("%s%c%s",
|
||||
head,
|
||||
network_->pathDivider(),
|
||||
tail);
|
||||
char *path = stringPrint("%s%c%s",
|
||||
head,
|
||||
network_->pathDivider(),
|
||||
tail);
|
||||
sta::stringDelete(head);
|
||||
sta::stringDelete(tail);
|
||||
return path;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user