about summary refs log tree commit diff
path: root/tests/codegen/patchable-function-entry.rs
diff options
context:
space:
mode:
authorFlorian Schmiderer <florian.schmiderer@posteo.net>2024-05-02 23:19:02 +0200
committerFlorian Schmiderer <florian.schmiderer@posteo.net>2024-06-25 19:00:02 +0200
commit7c56398e912ea9e81d8e56b2ca7459b4e62b6636 (patch)
treef465c05bc346068ca3a26f5c78eb0cd1a32c23db /tests/codegen/patchable-function-entry.rs
parent9b0ae75ecc485d668232c9c85f0090fb85668312 (diff)
Updated code for changes to RFC, added additional error handling, added
tests
Diffstat (limited to 'tests/codegen/patchable-function-entry.rs')
-rw-r--r--tests/codegen/patchable-function-entry.rs28
1 files changed, 0 insertions, 28 deletions
diff --git a/tests/codegen/patchable-function-entry.rs b/tests/codegen/patchable-function-entry.rs
deleted file mode 100644
index dc20c0a2c6d..00000000000
--- a/tests/codegen/patchable-function-entry.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-#![feature(patchable_function_entry)]
-// compile-flags: -Z patchable-function-entry=15,10
-
-#![crate_type = "lib"]
-
-// This should have the default, as set by the compile flags
-#[no_mangle]
-pub fn foo() {}
-
-// The attribute should override the compile flags
-#[no_mangle]
-#[patchable_function_entry(prefix(1), entry(2))]
-pub fn bar() {}
-
-// If we override an attribute to 0 or unset, the attribute should go away
-#[no_mangle]
-#[patchable_function_entry(entry(0))]
-pub fn baz() {}
-
-// CHECK: @foo() unnamed_addr #0
-// CHECK: @bar() unnamed_addr #1
-// CHECK: @baz() unnamed_addr #2
-
-// CHECK: attributes #0 = { {{.*}}"patchable-function-entry"="5"{{.*}}"patchable-function-prefix"="10" {{.*}} }
-// CHECK: attributes #1 = { {{.*}}"patchable-function-entry"="2"{{.*}}"patchable-function-prefix"="1" {{.*}} }
-// CHECK-NOT: attributes #2 = { {{.*}}patchable-function-entry{{.*}} }
-// CHECK-NOT: attributes #2 = { {{.*}}patchable-function-prefix{{.*}} }
-// CHECK: attributes #2 = { {{.*}} }