Support LLVM 13+

This commit is contained in:
Christoffer Lerno
2021-08-31 22:39:01 +02:00
parent 26f508cec5
commit 73ce1017e8

View File

@@ -1041,7 +1041,11 @@ static inline void llvm_emit_asm_stmt(GenContext *c, Ast *ast)
scratch_buffer_to_string(), global_context.scratch_buffer_len,
ast->asm_stmt.is_volatile,
true,
LLVMInlineAsmDialectIntel);
LLVMInlineAsmDialectIntel
#if LLVM_VERSION_MAJOR > 12
, /* can throw */ false
#endif
);
LLVMBuildCall2(c->builder, asm_fn_type, asm_fn, NULL, 0, "");
}