Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
David Koloski committed Sep 6, 2023
1 parent c18da3c commit ddd8878
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// compile-flags: -O -Ccodegen-units=1
// only-x86_64-unknown-linux-gnu

#![crate_type = "lib"]

Expand All @@ -19,6 +18,7 @@ impl Copy for Boolean {}

extern "C" {
fn set_value(foo: *mut i64);
fn bar();
}

pub fn foo(x: bool) {
Expand All @@ -39,12 +39,8 @@ pub fn foo(x: bool) {
let l2 = unsafe { *foo.as_mut_ptr() };
if l2 == 2 {
// CHECK: call void @bar
bar();
unsafe {
bar();
}
}
}

#[no_mangle]
#[inline(never)]
pub fn bar() {
println!("Working correctly!");
}

0 comments on commit ddd8878

Please sign in to comment.