mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
Use constant instead of hardcoded string
This commit is contained in:
parent
65244d6383
commit
e65e6c97d1
1 changed files with 3 additions and 2 deletions
|
@ -42,6 +42,7 @@ macro_rules! run_jit_function {
|
||||||
}};
|
}};
|
||||||
($lib: expr, $main_fn_name: expr, $ty:ty, $transform:expr, $errors:expr, $expect_failures:expr) => {{
|
($lib: expr, $main_fn_name: expr, $ty:ty, $transform:expr, $errors:expr, $expect_failures:expr) => {{
|
||||||
use inkwell::context::Context;
|
use inkwell::context::Context;
|
||||||
|
use roc_builtins::bitcode;
|
||||||
use roc_gen_llvm::run_roc::RocCallResult;
|
use roc_gen_llvm::run_roc::RocCallResult;
|
||||||
use std::mem::MaybeUninit;
|
use std::mem::MaybeUninit;
|
||||||
|
|
||||||
|
@ -62,11 +63,11 @@ macro_rules! run_jit_function {
|
||||||
let get_expect_failures: libloading::Symbol<
|
let get_expect_failures: libloading::Symbol<
|
||||||
unsafe extern "C" fn() -> (*const Failure, usize),
|
unsafe extern "C" fn() -> (*const Failure, usize),
|
||||||
> = $lib
|
> = $lib
|
||||||
.get("roc_builtins.utils.get_expect_failures".as_bytes())
|
.get(bitcode::UTILS_GET_EXPECT_FAILURES.as_bytes())
|
||||||
.ok()
|
.ok()
|
||||||
.ok_or(format!(
|
.ok_or(format!(
|
||||||
"Unable to JIT compile `{}`",
|
"Unable to JIT compile `{}`",
|
||||||
"roc_builtins.utils.get_expect_failures"
|
bitcode::UTILS_GET_EXPECT_FAILURES
|
||||||
))
|
))
|
||||||
.expect("errored");
|
.expect("errored");
|
||||||
let mut main_result = MaybeUninit::uninit();
|
let mut main_result = MaybeUninit::uninit();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue