aboutsummaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2020-08-25 15:46:44 -0700
committerH. Peter Anvin (Intel) <hpa@zytor.com>2020-08-25 15:46:44 -0700
commit8c9b8ec2e21e10be73dcbfa8288a124a5f7b133d (patch)
tree0c8ba8f0e9c9acc217ec3add010defdee808cdfe /asm
parent64c7c763c26c66baa169235f5bfa9ef402e5293c (diff)
downloadnasm-8c9b8ec2e21e10be73dcbfa8288a124a5f7b133d.tar.gz
nasm-8c9b8ec2e21e10be73dcbfa8288a124a5f7b133d.tar.xz
nasm-8c9b8ec2e21e10be73dcbfa8288a124a5f7b133d.zip
srcfile: add src_nowhere()
Add src_nowhere() returning (null:0). Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'asm')
-rw-r--r--asm/srcfile.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/asm/srcfile.h b/asm/srcfile.h
index ec9965d3..a1853548 100644
--- a/asm/srcfile.h
+++ b/asm/srcfile.h
@@ -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