diff options
author | Sahand Kashani <sahand.kashani@gmail.com> | 2020-04-08 23:20:56 +0200 |
---|---|---|
committer | Sahand Kashani <sahand.kashani@gmail.com> | 2020-04-08 23:20:56 +0200 |
commit | 820e3d1dad4f484f9646588f79b73b21b495e3d8 (patch) | |
tree | c1ecb184d09dc988f7377fd90246e43d24b0e75e | |
parent | 6c2b220af56ccac5ce343914cab095114656c83a (diff) | |
download | yosys-820e3d1dad4f484f9646588f79b73b21b495e3d8.tar.gz yosys-820e3d1dad4f484f9646588f79b73b21b495e3d8.tar.bz2 yosys-820e3d1dad4f484f9646588f79b73b21b495e3d8.zip |
Remove unnecessary pruning of double-quoting
In the past I was calling the ILANG_BACKEND::dump_const() to dump
values to an output stream. When these values were strings, the
function used to add quotes around them. The firrtl compiler, in turn,
escaped these quotes and the result was double-quoted strings which
were hard to read.
However I'm now calling design_entity->get_src_attribute() directly
and there is no additional quote being put around it, so we can
safely remove the unnecessary call to str.erase() here.
-rw-r--r-- | backends/firrtl/firrtl.cc | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/backends/firrtl/firrtl.cc b/backends/firrtl/firrtl.cc index 0cac437ac..3ef886664 100644 --- a/backends/firrtl/firrtl.cc +++ b/backends/firrtl/firrtl.cc @@ -47,11 +47,6 @@ std::string getFileinfo(const RTLIL::AttrObject *design_entity) { std::string src(design_entity->get_src_attribute()); std::string fileinfo_str = src.empty() ? "" : "@[" + src + "]"; - - // Remove quotes from src attribute as firrtl automatically escapes and - // double-quotes them. - fileinfo_str.erase(std::remove(fileinfo_str.begin(), fileinfo_str.end(), '\"'), fileinfo_str.end()); - return fileinfo_str; } |