修复IR函数参数输出,变量命名

This commit is contained in:
rain2133
2025-06-24 16:39:42 +08:00
parent 73dd8eba22
commit d50f76a770
2 changed files with 7 additions and 4 deletions

View File

@@ -598,11 +598,11 @@ auto SymbolTable::addVariable(const std::string &name, User *variable) -> User *
std::stringstream ss;
auto iter = variableIndex.find(name);
if (iter != variableIndex.end()) {
ss << name << "(" << iter->second << ")";
ss << name << iter->second ;
iter->second += 1;
} else {
variableIndex.emplace(name, 1);
ss << name << "(" << 0 << ")";
ss << name << 0 ;
}
variable->setName(ss.str());