about summary refs log tree commit diff
path: root/tests/codegen-llvm/lifetime_start_end.rs
diff options
context:
space:
mode:
authorMatthew Maurer <mmaurer@google.com>2025-08-08 17:38:03 +0000
committerMatthew Maurer <mmaurer@google.com>2025-08-11 22:00:41 +0000
commit258915a55539593423c3d4c30f7b741f65c56e51 (patch)
tree2ea8753167070a017ea7324a13141521478ac65b /tests/codegen-llvm/lifetime_start_end.rs
parent2886b36df4a646dd8d82fb65bf0c9d8d96c1f71a (diff)
downloadrust-258915a55539593423c3d4c30f7b741f65c56e51.tar.gz
rust-258915a55539593423c3d4c30f7b741f65c56e51.zip
llvm: Accept new LLVM lifetime format
LLVM removed the size parameter from the lifetime format.
Tolerate not having that size parameter.
Diffstat (limited to 'tests/codegen-llvm/lifetime_start_end.rs')
-rw-r--r--tests/codegen-llvm/lifetime_start_end.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/codegen-llvm/lifetime_start_end.rs b/tests/codegen-llvm/lifetime_start_end.rs
index 0639e7640aa..2df5acf54df 100644
--- a/tests/codegen-llvm/lifetime_start_end.rs
+++ b/tests/codegen-llvm/lifetime_start_end.rs
@@ -8,27 +8,27 @@ pub fn test() {
     let a = 0u8;
     &a; // keep variable in an alloca
 
-    // CHECK: call void @llvm.lifetime.start{{.*}}(i{{[0-9 ]+}}, ptr %a)
+    // CHECK: call void @llvm.lifetime.start{{.*}}({{(i[0-9 ]+, )?}}ptr %a)
 
     {
         let b = &Some(a);
         &b; // keep variable in an alloca
 
-        // CHECK: call void @llvm.lifetime.start{{.*}}(i{{[0-9 ]+}}, {{.*}})
+        // CHECK: call void @llvm.lifetime.start{{.*}}({{(i[0-9 ]+, )?}}{{.*}})
 
-        // CHECK: call void @llvm.lifetime.start{{.*}}(i{{[0-9 ]+}}, {{.*}})
+        // CHECK: call void @llvm.lifetime.start{{.*}}({{(i[0-9 ]+, )?}}{{.*}})
 
-        // CHECK: call void @llvm.lifetime.end{{.*}}(i{{[0-9 ]+}}, {{.*}})
+        // CHECK: call void @llvm.lifetime.end{{.*}}({{(i[0-9 ]+, )?}}{{.*}})
 
-        // CHECK: call void @llvm.lifetime.end{{.*}}(i{{[0-9 ]+}}, {{.*}})
+        // CHECK: call void @llvm.lifetime.end{{.*}}({{(i[0-9 ]+, )?}}{{.*}})
     }
 
     let c = 1u8;
     &c; // keep variable in an alloca
 
-    // CHECK: call void @llvm.lifetime.start{{.*}}(i{{[0-9 ]+}}, ptr %c)
+    // CHECK: call void @llvm.lifetime.start{{.*}}({{(i[0-9 ]+, )?}}ptr %c)
 
-    // CHECK: call void @llvm.lifetime.end{{.*}}(i{{[0-9 ]+}}, ptr %c)
+    // CHECK: call void @llvm.lifetime.end{{.*}}({{(i[0-9 ]+, )?}}ptr %c)
 
-    // CHECK: call void @llvm.lifetime.end{{.*}}(i{{[0-9 ]+}}, ptr %a)
+    // CHECK: call void @llvm.lifetime.end{{.*}}({{(i[0-9 ]+, )?}}ptr %a)
 }