summary refs log tree commit diff
path: root/src/test/codegen
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-07-30 10:58:59 +0000
committerbors <bors@rust-lang.org>2020-07-30 10:58:59 +0000
commit1ce0cf070e0f5c1157976fc1106eded67bac2050 (patch)
treed525917fa5220320d4cb5bde11f3cb51305b8ee8 /src/test/codegen
parent1799d31847294d6e3816c17679247a5c206e809a (diff)
parent25670749b44a9c7a4cfd3fbf780bbe3344a9a6c5 (diff)
downloadrust-1ce0cf070e0f5c1157976fc1106eded67bac2050.tar.gz
rust-1ce0cf070e0f5c1157976fc1106eded67bac2050.zip
Auto merge of #74105 - npmccallum:naked, r=matthewjasper
Suppress debuginfo on naked function arguments

A function that has no prologue cannot be reasonably expected to support
debuginfo. In fact, the existing code (before this patch) would generate
invalid instructions that caused crashes. We can solve this easily by
just not emitting the debuginfo in this case.

Fixes https://github.com/rust-lang/rust/issues/42779
cc https://github.com/rust-lang/rust/issues/32408
Diffstat (limited to 'src/test/codegen')
-rw-r--r--src/test/codegen/naked-functions.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/codegen/naked-functions.rs b/src/test/codegen/naked-functions.rs
index 493c1b9f0ba..758c6c4da92 100644
--- a/src/test/codegen/naked-functions.rs
+++ b/src/test/codegen/naked-functions.rs
@@ -18,7 +18,7 @@ pub fn naked_empty() {
 // CHECK-NEXT: define void @naked_with_args(i{{[0-9]+( %0)?}})
 pub fn naked_with_args(a: isize) {
     // CHECK-NEXT: {{.+}}:
-    // CHECK-NEXT: %a = alloca i{{[0-9]+}}
+    // CHECK-NEXT: %_1 = alloca i{{[0-9]+}}
     &a; // keep variable in an alloca
     // CHECK: ret void
 }
@@ -39,7 +39,7 @@ pub fn naked_with_return() -> isize {
 #[naked]
 pub fn naked_with_args_and_return(a: isize) -> isize {
     // CHECK-NEXT: {{.+}}:
-    // CHECK-NEXT: %a = alloca i{{[0-9]+}}
+    // CHECK-NEXT: %_1 = alloca i{{[0-9]+}}
     &a; // keep variable in an alloca
     // CHECK: ret i{{[0-9]+}} %{{[0-9]+}}
     a