Skip to content

Commit

Permalink
Test new llvm-to-clang compilation pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
brenhinkeller authored Mar 4, 2024
1 parent e40370f commit a9c2ffe
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/testcore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ end
@test isa(r, Base.Process)
@test r.exitcode == 0

filepath = compile_executable(foo, (), workdir, llvm_to_clang=true)
r = run(`$filepath`);
@test isa(r, Base.Process)
@test r.exitcode == 0


@inline function _puts(s::Ptr{UInt8}) # Can't use Base.println because it allocates
Base.llvmcall(("""
Expand Down Expand Up @@ -85,6 +90,11 @@ end
@test isa(r, Base.Process)
@test r.exitcode == 0

filepath = compile_executable(print_args, (Int, Ptr{Ptr{UInt8}}), workdir, llvm_to_clang=true)
r = run(`$filepath Hello, world!`);
@test isa(r, Base.Process)
@test r.exitcode == 0


# Compile a function that definitely fails
@inline foo_err() = UInt64(-1)
Expand Down

0 comments on commit a9c2ffe

Please sign in to comment.