From e075586d4fd428374a788eecc391e23ec4a17b46 Mon Sep 17 00:00:00 2001 From: cynecx Date: Mon, 7 Feb 2022 01:21:23 +0100 Subject: add tests and fix comments --- src/test/codegen/used_with_arg.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/test/codegen/used_with_arg.rs (limited to 'src/test/codegen') diff --git a/src/test/codegen/used_with_arg.rs b/src/test/codegen/used_with_arg.rs new file mode 100644 index 00000000000..cd759b167c0 --- /dev/null +++ b/src/test/codegen/used_with_arg.rs @@ -0,0 +1,12 @@ +// compile-flags: -O + +#![crate_type = "lib"] +#![feature(used_with_arg)] + +// CHECK: @llvm.used = appending global [1 x i8*] +#[used(linker)] +static mut USED_LINKER: [usize; 1] = [0]; + +// CHECK-NEXT: @llvm.compiler.used = appending global [1 x i8*] +#[used(compiler)] +static mut USED_COMPILER: [usize; 1] = [0]; -- cgit 1.4.1-3-g733a5