diff options
| author | Nathaniel McCallum <npmccallum@redhat.com> | 2020-07-06 14:32:30 -0400 |
|---|---|---|
| committer | Nathaniel McCallum <npmccallum@redhat.com> | 2020-07-27 18:27:15 -0400 |
| commit | 25670749b44a9c7a4cfd3fbf780bbe3344a9a6c5 (patch) | |
| tree | 61d06dd1a5b0a791c528f22f01d3194282265fd4 /src/test/codegen | |
| parent | 0e11fc8053d32c44e7152865852acc5c3c54efb3 (diff) | |
| download | rust-25670749b44a9c7a4cfd3fbf780bbe3344a9a6c5.tar.gz rust-25670749b44a9c7a4cfd3fbf780bbe3344a9a6c5.zip | |
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.rs | 4 |
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 |
