diff options
| author | Nathan Corbyn <me@nathancorbyn.com> | 2020-06-08 09:37:11 +0100 |
|---|---|---|
| committer | Nathan Corbyn <me@nathancorbyn.com> | 2020-06-15 09:40:56 +0100 |
| commit | 6b7cacb2c99567a76cf0d5ce6833a129c8bb8814 (patch) | |
| tree | f0a358cb6e0cb9ea6a0aeedc366b00dd66b3a4a9 /src/test/codegen/cdylib-external-inline-fns.rs | |
| parent | f62903b74a8630fa62e721f69e6621d1d441e7f1 (diff) | |
| download | rust-6b7cacb2c99567a76cf0d5ce6833a129c8bb8814.tar.gz rust-6b7cacb2c99567a76cf0d5ce6833a129c8bb8814.zip | |
Export all fns with extern indicator
Diffstat (limited to 'src/test/codegen/cdylib-external-inline-fns.rs')
| -rw-r--r-- | src/test/codegen/cdylib-external-inline-fns.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/codegen/cdylib-external-inline-fns.rs b/src/test/codegen/cdylib-external-inline-fns.rs new file mode 100644 index 00000000000..58f806b5a1f --- /dev/null +++ b/src/test/codegen/cdylib-external-inline-fns.rs @@ -0,0 +1,23 @@ +// compile-flags: -C no-prepopulate-passes + +#![crate_type = "cdylib"] + +// CHECK: define void @a() +#[no_mangle] +#[inline] +pub extern "C" fn a() {} + +// CHECK: define void @b() +#[export_name = "b"] +#[inline] +pub extern "C" fn b() {} + +// CHECK: define void @c() +#[no_mangle] +#[inline] +extern "C" fn c() {} + +// CHECK: define void @d() +#[export_name = "d"] +#[inline] +extern "C" fn d() {} |
