Skip to content

Commit f86e409

Browse files
committed
Don't hardcode attribute id in codegen test
1 parent a315bb4 commit f86e409

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/codegen/unwind-abis/c-unwind-abi-panic-abort.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@
66
#![crate_type = "lib"]
77
#![feature(c_unwind)]
88

9-
// CHECK: @rust_item_that_can_unwind() unnamed_addr #0
9+
// CHECK: @rust_item_that_can_unwind() unnamed_addr [[ATTR0:#[0-9]+]]
1010
#[no_mangle]
1111
pub unsafe extern "C-unwind" fn rust_item_that_can_unwind() {
1212
// CHECK: call void @_ZN4core9panicking15panic_no_unwind
1313
may_unwind();
1414
}
1515

1616
extern "C-unwind" {
17-
// CHECK: @may_unwind() unnamed_addr #1
17+
// CHECK: @may_unwind() unnamed_addr [[ATTR1:#[0-9]+]]
1818
fn may_unwind();
1919
}
2020

2121
// Now, make sure that the LLVM attributes for this functions are correct. First, make
2222
// sure that the first item is correctly marked with the `nounwind` attribute:
2323
//
24-
// CHECK: attributes #0 = { {{.*}}nounwind{{.*}} }
24+
// CHECK: attributes [[ATTR0]] = { {{.*}}nounwind{{.*}} }
2525
//
2626
// Now, check that foreign item is correctly marked without the `nounwind` attribute.
27-
// CHECK-NOT: attributes #1 = { {{.*}}nounwind{{.*}} }
27+
// CHECK-NOT: attributes [[ATTR1]] = { {{.*}}nounwind{{.*}} }

0 commit comments

Comments
 (0)