From 73ce1017e8c35eeb57efef4be0b9e6bf0a8eb440 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Tue, 31 Aug 2021 22:39:01 +0200 Subject: [PATCH] Support LLVM 13+ --- src/compiler/llvm_codegen_stmt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/compiler/llvm_codegen_stmt.c b/src/compiler/llvm_codegen_stmt.c index fd5a22666..b7f30afb7 100644 --- a/src/compiler/llvm_codegen_stmt.c +++ b/src/compiler/llvm_codegen_stmt.c @@ -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, ""); }