summaryrefslogtreecommitdiffhomepage
path: root/ir/ident
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2016-05-12 10:01:48 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2016-05-17 14:10:53 +0200
commit6f0d594fa46516838eb602fed80efb2074dc4e1d (patch)
treed5a67a9fcf9dcc0dd71fbf359a5f369e47cb3c19 /ir/ident
parent9d78d6c9ef7069eb3f179ea6e43e32a05d15201b (diff)
ident: Simplify the interface of id_unique().
Now you only pass a name prefix and it automatically adds a ".%u".
Diffstat (limited to 'ir/ident')
-rw-r--r--ir/ident/ident.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ir/ident/ident.c b/ir/ident/ident.c
index 4cbddde..db0b6a2 100644
--- a/ir/ident/ident.c
+++ b/ir/ident/ident.c
@@ -73,5 +73,5 @@ void finish_ident(void)
ident *id_unique(const char *tag)
{
static unsigned unique_id = 0;
- return new_id_fmt(tag, unique_id++);
+ return new_id_fmt("%s.%u", tag, unique_id++);
}