Use string for TempVar::name

Nothing of consequence; just encapsulation of memory management
This commit is contained in:
Jon Siwek 2021-01-13 13:49:32 -08:00
parent 81fa7f7e3d
commit fe8db7f150
2 changed files with 5 additions and 5 deletions

View file

@ -10,7 +10,7 @@ TempVar::TempVar(int num, const TypePtr& t, ExprPtr _rhs) : type(t)
{
char buf[8192];
snprintf(buf, sizeof buf, "#%d", num);
name = util::copy_string(buf);
name = buf;
id = nullptr;
}