about summary refs log tree commit diff
path: root/tests/codegen/mir-inlined-line-numbers.rs
diff options
context:
space:
mode:
authorPietro Albini <pietro.albini@ferrous-systems.com>2023-05-23 15:11:17 +0200
committerPietro Albini <pietro.albini@ferrous-systems.com>2023-05-23 16:54:30 +0200
commit5fdeae610db96d048090b1efaf6b7a2f54aeda12 (patch)
tree5f374da14c031a5af61d6c0b64adb92c96827ff0 /tests/codegen/mir-inlined-line-numbers.rs
parentf3d597b31c0f101a02c230798afa31a36bdacbc6 (diff)
downloadrust-5fdeae610db96d048090b1efaf6b7a2f54aeda12.tar.gz
rust-5fdeae610db96d048090b1efaf6b7a2f54aeda12.zip
codegen: allow extra attributes to functions when panic=abort
When compiling with panic=abort (or using a target that doesn't have
unwinding support), the compiler adds the "nounwind" attribute to
functions. This results in a different LLVM IR, which results in a #NNN
added after the function name:

    tail call void @bar() #13, !dbg !467
    attributes #13 = { nounwind }

...instead of:

    tail call void @bar(), !dbg !467

This commit changes the matchers to swallow the #NNN, as it's not needed
for these specific tests.
Diffstat (limited to 'tests/codegen/mir-inlined-line-numbers.rs')
-rw-r--r--tests/codegen/mir-inlined-line-numbers.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/codegen/mir-inlined-line-numbers.rs b/tests/codegen/mir-inlined-line-numbers.rs
index 19d83f0eee7..d13527b9521 100644
--- a/tests/codegen/mir-inlined-line-numbers.rs
+++ b/tests/codegen/mir-inlined-line-numbers.rs
@@ -19,7 +19,7 @@ pub fn example() {
 }
 
 // CHECK-LABEL: @example
-// CHECK:   tail call void @bar(), !dbg [[DBG_ID:![0-9]+]]
+// CHECK:   tail call void @bar(){{( #[0-9]+)?}}, !dbg [[DBG_ID:![0-9]+]]
 // CHECK: [[DBG_ID]] = !DILocation(line: 7,
 // CHECK-SAME:                     inlinedAt: [[INLINE_ID:![0-9]+]])
 // CHECK: [[INLINE_ID]] = !DILocation(line: 18,