2022-11-21 23:29:00 -06:00
|
|
|
// Verifies that "kcfi" module flag is added.
|
|
|
|
//
|
2023-09-09 19:00:00 -05:00
|
|
|
// revisions: aarch64 x86_64
|
|
|
|
// [aarch64] compile-flags: --target aarch64-unknown-none
|
|
|
|
// [aarch64] needs-llvm-components: aarch64
|
|
|
|
// [x86_64] compile-flags: --target x86_64-unknown-none
|
|
|
|
// [x86_64] needs-llvm-components: x86
|
2022-11-21 23:29:00 -06:00
|
|
|
// compile-flags: -Ctarget-feature=-crt-static -Zsanitizer=kcfi
|
|
|
|
|
2023-09-09 19:00:00 -05:00
|
|
|
#![feature(no_core, lang_items)]
|
2022-11-21 23:29:00 -06:00
|
|
|
#![crate_type="lib"]
|
2023-09-09 19:00:00 -05:00
|
|
|
#![no_core]
|
|
|
|
|
|
|
|
#[lang="sized"]
|
|
|
|
trait Sized { }
|
|
|
|
#[lang="copy"]
|
|
|
|
trait Copy { }
|
2022-11-21 23:29:00 -06:00
|
|
|
|
|
|
|
pub fn foo() {
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: !{{[0-9]+}} = !{i32 4, !"kcfi", i32 1}
|