mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
fix warnings in test files
This commit is contained in:
parent
0fbcfc7431
commit
f31c116f7c
6 changed files with 1 additions and 41 deletions
|
@ -605,7 +605,6 @@ pub fn build_exp_stmt<'a, 'ctx, 'env>(
|
|||
|
||||
match stmt {
|
||||
Let(symbol, expr, layout, cont) => {
|
||||
println!("{} {:?}", symbol, expr);
|
||||
let context = &env.context;
|
||||
|
||||
let val = build_exp_expr(env, layout_ids, &scope, parent, &expr);
|
||||
|
|
|
@ -20,7 +20,6 @@ mod gen_list {
|
|||
use inkwell::passes::PassManager;
|
||||
use inkwell::types::BasicType;
|
||||
use inkwell::OptimizationLevel;
|
||||
use roc_collections::all::ImMap;
|
||||
use roc_gen::llvm::build::{build_proc, build_proc_header};
|
||||
use roc_gen::llvm::convert::basic_type_from_layout;
|
||||
use roc_mono::layout::Layout;
|
||||
|
|
|
@ -20,7 +20,6 @@ mod gen_num {
|
|||
use inkwell::passes::PassManager;
|
||||
use inkwell::types::BasicType;
|
||||
use inkwell::OptimizationLevel;
|
||||
use roc_collections::all::ImMap;
|
||||
use roc_gen::llvm::build::{build_proc, build_proc_header};
|
||||
use roc_gen::llvm::convert::basic_type_from_layout;
|
||||
use roc_mono::layout::Layout;
|
||||
|
|
|
@ -20,7 +20,6 @@ mod gen_primitives {
|
|||
use inkwell::passes::PassManager;
|
||||
use inkwell::types::BasicType;
|
||||
use inkwell::OptimizationLevel;
|
||||
use roc_collections::all::ImMap;
|
||||
use roc_gen::llvm::build::{build_proc, build_proc_header};
|
||||
use roc_gen::llvm::convert::basic_type_from_layout;
|
||||
use roc_mono::layout::Layout;
|
||||
|
|
|
@ -20,7 +20,6 @@ mod gen_records {
|
|||
use inkwell::passes::PassManager;
|
||||
use inkwell::types::BasicType;
|
||||
use inkwell::OptimizationLevel;
|
||||
use roc_collections::all::ImMap;
|
||||
use roc_gen::llvm::build::{build_proc, build_proc_header};
|
||||
use roc_gen::llvm::convert::basic_type_from_layout;
|
||||
use roc_mono::layout::Layout;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
macro_rules! assert_opt_evals_to {
|
||||
($src:expr, $expected:expr, $ty:ty, $transform:expr, $leak:expr) => {
|
||||
use roc_gen::llvm::build::Scope;
|
||||
use roc_gen::llvm::build::{build_proc_header, build_proc};
|
||||
|
||||
let arena = Bump::new();
|
||||
let target = target_lexicon::Triple::host();
|
||||
|
@ -192,40 +191,6 @@ macro_rules! assert_opt_evals_to {
|
|||
};
|
||||
}
|
||||
|
||||
// #[macro_export]
|
||||
macro_rules! assert_evals_to {
|
||||
($src:expr, $expected:expr, $ty:ty) => {
|
||||
// Run un-optimized tests, and then optimized tests, in separate scopes.
|
||||
// These each rebuild everything from scratch, starting with
|
||||
// parsing the source, so that there's no chance their passing
|
||||
// or failing depends on leftover state from the previous one.
|
||||
{
|
||||
assert_llvm_evals_to!($src, $expected, $ty, (|val| val));
|
||||
}
|
||||
{
|
||||
assert_opt_evals_to!($src, $expected, $ty, (|val| val));
|
||||
}
|
||||
};
|
||||
($src:expr, $expected:expr, $ty:ty, $transform:expr) => {
|
||||
// Same as above, except with an additional transformation argument.
|
||||
{
|
||||
assert_llvm_evals_to!($src, $expected, $ty, $transform);
|
||||
}
|
||||
{
|
||||
assert_opt_evals_to!($src, $expected, $ty, $transform);
|
||||
}
|
||||
};
|
||||
($src:expr, $expected:expr, $ty:ty, $transform:expr, $leak:expr) => {
|
||||
// Same as above, except with an additional transformation argument.
|
||||
{
|
||||
assert_llvm_evals_to!($src, $expected, $ty, $transform, $leak);
|
||||
}
|
||||
{
|
||||
assert_opt_evals_to!($src, $expected, $ty, $transform, $leak);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! assert_llvm_evals_to {
|
||||
($src:expr, $expected:expr, $ty:ty, $transform:expr, $leak:expr) => {
|
||||
|
@ -385,7 +350,7 @@ macro_rules! assert_llvm_evals_to {
|
|||
builder.build_return(Some(&ret));
|
||||
|
||||
// Uncomment this to see the module's un-optimized LLVM instruction output:
|
||||
env.module.print_to_stderr();
|
||||
// env.module.print_to_stderr();
|
||||
|
||||
if main_fn.verify(true) {
|
||||
fpm.run_on(&main_fn);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue