Hack to not allow inlining even when Rust wants to do it in release mode.

This commit is contained in:
Yury Delendik
2019-04-10 10:32:58 -05:00
committed by Dan Gohman
parent 1f9167f44d
commit 07a6ca8f4e

View File

@@ -36,7 +36,13 @@ static mut __jit_debug_descriptor: JITDescriptor = JITDescriptor {
#[no_mangle]
#[inline(never)]
extern "C" fn __jit_debug_register_code() {}
extern "C" fn __jit_debug_register_code() {
// Hack to not allow inlining even when Rust wants to do it in release mode.
let x = 3;
unsafe {
std::ptr::read_volatile(&x);
}
}
/// Registeration for JIT image
pub struct GdbJitImageRegistration {