about summary refs log tree commit diff
path: root/tests/codegen
diff options
context:
space:
mode:
authorFolkert de Vries <folkert@folkertdev.nl>2025-07-02 10:46:15 +0200
committerFolkert de Vries <folkert@folkertdev.nl>2025-07-16 21:38:58 +0200
commitec0ff720d1a89cb51edd90116c6e70051affa95f (patch)
tree5c0005c15fd2164d009c0cc38e42262350919cce /tests/codegen
parentf100767dce1fcc0287047053cc29659ac5321a6b (diff)
downloadrust-ec0ff720d1a89cb51edd90116c6e70051affa95f.tar.gz
rust-ec0ff720d1a89cb51edd90116c6e70051affa95f.zip
add `codegen_instance_attrs` query
and use it for naked functions
Diffstat (limited to 'tests/codegen')
-rw-r--r--tests/codegen/sanitizer/kcfi/naked-function.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/codegen/sanitizer/kcfi/naked-function.rs b/tests/codegen/sanitizer/kcfi/naked-function.rs
index 92431fc7d63..2c8cdc919b8 100644
--- a/tests/codegen/sanitizer/kcfi/naked-function.rs
+++ b/tests/codegen/sanitizer/kcfi/naked-function.rs
@@ -25,6 +25,11 @@ trait MyTrait {
 }
 impl MyTrait for Thing {}
 
+// the shim calls the real function
+// CHECK-LABEL: define
+// CHECK-SAME: my_naked_function
+// CHECK-SAME: reify.shim.fnptr
+
 // CHECK-LABEL: main
 #[unsafe(no_mangle)]
 pub fn main() {
@@ -32,16 +37,11 @@ pub fn main() {
     const F: extern "C" fn() = Thing::my_naked_function;
 
     // main calls the shim function
-    // CHECK: call
+    // CHECK: call void
     // CHECK-SAME: my_naked_function
     // CHECK-SAME: reify.shim.fnptr
     (F)();
 }
 
-// the shim calls the real function
-// CHECK: define
-// CHECK-SAME: my_naked_function
-// CHECK-SAME: reify.shim.fnptr
-
 // CHECK: declare !kcfi_type
 // CHECK-SAME: my_naked_function