diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-08-02 00:45:25 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-08-02 00:45:25 +0200 |
commit | 14412e6c957a34381c33740426b35f7b90a446be (patch) | |
tree | d45765adc9aa28301ab0c9d100728a5d720503fd /frontends | |
parent | 75ffd1643c97321255bc591edf0c1a7097b8dce9 (diff) | |
download | yosys-14412e6c957a34381c33740426b35f7b90a446be.tar.gz yosys-14412e6c957a34381c33740426b35f7b90a446be.tar.bz2 yosys-14412e6c957a34381c33740426b35f7b90a446be.zip |
Preparations for RTLIL::IdString redesign: cleanup of existing code
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/ast/ast.cc | 4 | ||||
-rw-r--r-- | frontends/ast/simplify.cc | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/frontends/ast/ast.cc b/frontends/ast/ast.cc index 85b67b65e..5815fb0d4 100644 --- a/frontends/ast/ast.cc +++ b/frontends/ast/ast.cc @@ -325,7 +325,7 @@ void AstNode::dumpVlog(FILE *f, std::string indent) } for (auto &it : attributes) { - fprintf(f, "%s" "(* %s = ", indent.c_str(), id2vl(it.first).c_str()); + fprintf(f, "%s" "(* %s = ", indent.c_str(), id2vl(it.first.str()).c_str()); it.second->dumpVlog(f, ""); fprintf(f, " *)%s", indent.empty() ? "" : "\n"); } @@ -958,7 +958,7 @@ AstModule::~AstModule() // create a new parametric module (when needed) and return the name of the generated module RTLIL::IdString AstModule::derive(RTLIL::Design *design, std::map<RTLIL::IdString, RTLIL::Const> parameters) { - std::string stripped_name = name; + std::string stripped_name = name.str(); if (stripped_name.substr(0, 9) == "$abstract") stripped_name = stripped_name.substr(9); diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index c51692f12..4d71bb394 100644 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@ -465,7 +465,7 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage, size_t pos = str.rfind('.'); if (pos == std::string::npos) log_error("Defparam `%s' does not contain a dot (module/parameter seperator) at %s:%d!\n", - RTLIL::id2cstr(str.c_str()), filename.c_str(), linenum); + RTLIL::id2cstr(str), filename.c_str(), linenum); std::string modname = str.substr(0, pos), paraname = "\\" + str.substr(pos+1); if (current_scope.count(modname) == 0 || current_scope.at(modname)->type != AST_CELL) log_error("Can't find cell for defparam `%s . %s` at %s:%d!\n", RTLIL::id2cstr(modname), RTLIL::id2cstr(paraname), filename.c_str(), linenum); |