X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fdebug%2Fseqnumbers.c;h=bb674b340b438a29a12ec47cfafdec9d99e4b328;hb=37c8a981ff579e3f241ec2a8df15e0b0faa234ef;hp=b6a982d1dc1e644bcae607895c1e591fe89c802e;hpb=02be155780584ba0b64cc0acc516a1e91638129c;p=libfirm diff --git a/ir/debug/seqnumbers.c b/ir/debug/seqnumbers.c index b6a982d1d..bb674b340 100644 --- a/ir/debug/seqnumbers.c +++ b/ir/debug/seqnumbers.c @@ -52,6 +52,7 @@ static int seqno_cmp(const void *elt, const void *key, size_t size) return (e1->filename != e2->filename) | (e1->lineno - e2->lineno); } + /* * Create a new sequence number from a filename and a line number. */ @@ -65,6 +66,19 @@ seqno_t firm_seqno_enter(const char *filename, unsigned lineno) return set_insert(seqnos, &key, sizeof(key), HASH(key)); } +/* + * Create a new sequence number from a filename ident and a line number. + */ +seqno_t firm_seqno_enter_id(ident *filename, unsigned lineno) +{ + struct sn_entry key; + + key.filename = filename; + key.lineno = lineno; + + return set_insert(seqnos, &key, sizeof(key), HASH(key)); +} + /** * Retrieve filename and line number form a sequence number */