2017-12-14 21:41:17 -06:00
|
|
|
// compile-flags: -O
|
2019-06-25 02:40:50 -05:00
|
|
|
// ignore-debug: the debug assertions get in the way
|
2017-12-14 21:41:17 -06:00
|
|
|
|
|
|
|
#![crate_type="rlib"]
|
|
|
|
|
|
|
|
// CHECK-LABEL: @memzero
|
|
|
|
// CHECK-NOT: store
|
|
|
|
// CHECK: call void @llvm.memset
|
|
|
|
// CHECK-NOT: store
|
|
|
|
#[no_mangle]
|
|
|
|
pub fn memzero(data: &mut [u8]) {
|
|
|
|
for i in 0..data.len() {
|
|
|
|
data[i] = 0;
|
|
|
|
}
|
|
|
|
}
|