[lab2]checkopint with "while, continue, break" not implemented

This commit is contained in:
ladev789
2025-03-31 20:46:04 +08:00
parent dfa396b06f
commit 9d619b11d7
4 changed files with 8 additions and 6 deletions

View File

@@ -264,7 +264,7 @@ std::any SysYIRGenerator::visitUnaryExp(SysYParser::UnaryExpContext* ctx) {
std::string argList = "";
for (size_t i = 0; i < args.size(); ++i) {
if (i > 0) argList += ", ";
argList += args[i];
argList +=tmpTable[args[i]] + " noundef " + args[i];
}
irStream << " " << temp << " = call " << currentReturnType << " @" << funcName << "(" << argList << ")\n";
tmpTable[temp] = currentReturnType;