diff options
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index bc0e731bea..e91eafa458 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -870,11 +870,13 @@ static LLVMValueRef get_handle_value(CodeGen *g, LLVMValueRef ptr, ZigType *type } } -static void ir_assert(bool ok, IrInstGen *source_instruction) { +static void ir_assert_impl(bool ok, IrInstGen *source_instruction, const char *file, unsigned int line) { if (ok) return; - src_assert(ok, source_instruction->base.source_node); + src_assert_impl(ok, source_instruction->base.source_node, file, line); } +#define ir_assert(OK, SOURCE_INSTRUCTION) ir_assert_impl((OK), (SOURCE_INSTRUCTION), __FILE__, __LINE__) + static bool ir_want_fast_math(CodeGen *g, IrInstGen *instruction) { // TODO memoize Scope *scope = instruction->base.scope; |
