srcfile: add src_nowhere()

Add src_nowhere() returning (null:0).

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin (Intel) 2020-08-25 15:46:44 -07:00
parent 64c7c763c2
commit 8c9b8ec2e2

View file

@ -44,6 +44,12 @@ struct src_location {
int32_t lineno;
};
static inline const_func struct src_location src_nowhere(void)
{
struct src_location no_where = { NULL, 0 };
return no_where;
}
/*
* Comparing the *pointer value* of filenames is valid, because the
* filename hash system guarantees that each unique filename string is