diff options
| author | gingerBill <bill@gingerbill.org> | 2021-04-01 15:46:07 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-04-01 15:46:07 +0100 |
| commit | f0392d0c75977e06db6d5a7ccda59cd709cfd2a5 (patch) | |
| tree | c01fb9c5e669596d50912bc85fda41c71f9922f1 /src/llvm_backend.cpp | |
| parent | 3bd39886a09991368162d432168dd26a45e0665a (diff) | |
Cleanup again
Diffstat (limited to 'src/llvm_backend.cpp')
| -rw-r--r-- | src/llvm_backend.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp index e88009957..0f198993d 100644 --- a/src/llvm_backend.cpp +++ b/src/llvm_backend.cpp @@ -9224,14 +9224,16 @@ lbValue lb_build_builtin_proc(lbProcedure *p, Ast *expr, TypeAndValue const &tv, GB_ASSERT(name != nullptr); unsigned id = LLVMLookupIntrinsicID(name, gb_strlen(name)); - LLVMValueRef ip = LLVMGetIntrinsicDeclaration(p->module->mod, id, &platform_type, 1); + LLVMTypeRef types[1] = {lb_type(p->module, platform_type)}; + LLVMValueRef ip = LLVMGetIntrinsicDeclaration(p->module->mod, id, types, gb_count_of(types)); + + lbValue res = {}; LLVMValueRef args[3] = {}; args[0] = x.value; args[1] = y.value; args[2] = scale.value; - lbValue res = {}; res.value = LLVMBuildCall(p->builder, ip, args, gb_count_of(args), ""); res.type = platform_type; return lb_emit_conv(p, res, tv.type); |