about summary refs log tree commit diff
path: root/tests/codegen/sanitizer/riscv64-shadow-call-stack.rs
blob: 945e46218d04a8504c4c92164e30b06173c0d7a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//@ add-core-stubs
//@ compile-flags: --target riscv64imac-unknown-none-elf -Zsanitizer=shadow-call-stack
//@ needs-llvm-components: riscv

#![allow(internal_features)]
#![crate_type = "rlib"]
#![feature(no_core, lang_items)]
#![no_core]

extern crate minicore;
use minicore::*;

// CHECK: ; Function Attrs:{{.*}}shadowcallstack
// CHECK: define dso_local void @foo() unnamed_addr #0
#[no_mangle]
pub fn foo() {}

// CHECK: attributes #0 = {{.*}}shadowcallstack{{.*}}