Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
4c17270332c2908a9e77d0c5a5cdfc27edd45654
rust/tests/codegen/alloc-optimisation.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
310 B
Rust
Raw Normal View History

Add a no-system-llvm compilecheck header
2017-06-08 17:18:05 +03:00
//@ compile-flags: -O
Prevent insta-stable no alloc shim support You will need to add the following as replacement for the old __rust_* definitions when not using the alloc shim. #[no_mangle] static __rust_no_alloc_shim_is_unstable: u8 = 0;
2022-09-10 11:33:44 +00:00
#![crate_type = "lib"]
Upgrade LLVM Includes https://github.com/rust-lang/llvm/pull/80 Includes https://github.com/rust-lang/llvm/pull/79 Also adds tests and thus fixes #24194
2017-06-03 15:07:57 +03:00
#[no_mangle]
pub fn alloc_test(data: u32) {
// CHECK-LABEL: @alloc_test
// CHECK-NEXT: start:
Prevent insta-stable no alloc shim support You will need to add the following as replacement for the old __rust_* definitions when not using the alloc shim. #[no_mangle] static __rust_no_alloc_shim_is_unstable: u8 = 0;
2022-09-10 11:33:44 +00:00
// CHECK-NEXT: {{.*}} load volatile i8, ptr @__rust_no_alloc_shim_is_unstable, align 1
Upgrade LLVM Includes https://github.com/rust-lang/llvm/pull/80 Includes https://github.com/rust-lang/llvm/pull/79 Also adds tests and thus fixes #24194
2017-06-03 15:07:57 +03:00
// CHECK-NEXT: ret void
let x = Box::new(data);
drop(x);
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 1407ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API