diff options
Diffstat (limited to 'src/utils.h')
| -rw-r--r-- | src/utils.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils.h b/src/utils.h index dfc018c..7718c1c 100644 --- a/src/utils.h +++ b/src/utils.h @@ -9,4 +9,7 @@ void _die_location(char *file, int line, Location loc, const char *fmt, ...); i64 i64max(i64 a, i64 b); i64 i64min(i64 a, i64 b); +// Assumes alignment is a power of 2 +i64 align_up(i64 val, i64 align); + #define die_location(loc, ...) _die_location(__FILE__, __LINE__, loc, __VA_ARGS__)
\ No newline at end of file |