2 // This test case makes sure that we don't run into LLVM's dreaded
3 // "possible ODR violation" assertion when compiling with LTO + Debuginfo.
4 // It covers cases that have traditionally been prone to cause this error.
5 // If new cases emerge, add them to this file.
7 // aux-build:debuginfo-lto-aux.rs
8 // compile-flags: -C lto -g
10 // ignore-asmjs wasm2js does not support source maps yet
12 extern crate debuginfo_lto_aux;
14 fn some_fn(x: i32) -> i32 {
20 let _ = debuginfo_lto_aux::mk_struct_with_lt(&i);
21 let _ = debuginfo_lto_aux::mk_regular_struct(1);
22 let _ = debuginfo_lto_aux::take_fn(some_fn, 1);
23 let _ = debuginfo_lto_aux::with_closure(22);
24 let _ = debuginfo_lto_aux::generic_fn(0f32);