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
c45073ec3ea800b31e634db9de1b51f978521ad5
rust/tests/codegen/llvm_module_flags.rs

8 lines
211 B
Rust
Raw Normal View History

Add -Z llvm_module_flag Allow adding values to the `!llvm.module.flags` metadata for a generated module. The syntax is `-Z llvm_module_flag=<name>:<type>:<value>:<behavior>` Currently only u32 values are supported but the type is required to be specified for forward compatibility. The `behavior` element must match one of the named LLVM metadata behaviors.viors. This flag is expected to be perma-unstable.
2023-10-09 02:22:14 -07:00
// Test for -Z llvm_module_flags
[AUTO_GENERATED] Migrate compiletest to use `ui_test`-style `//@` directives
2024-02-22 12:10:29 +00:00
//@ compile-flags: -Z llvm_module_flag=foo:u32:123:error -Z llvm_module_flag=bar:u32:42:max
Add -Z llvm_module_flag Allow adding values to the `!llvm.module.flags` metadata for a generated module. The syntax is `-Z llvm_module_flag=<name>:<type>:<value>:<behavior>` Currently only u32 values are supported but the type is required to be specified for forward compatibility. The `behavior` element must match one of the named LLVM metadata behaviors.viors. This flag is expected to be perma-unstable.
2023-10-09 02:22:14 -07:00
fn main() {}
// CHECK: !{i32 1, !"foo", i32 123}
// CHECK: !{i32 7, !"bar", i32 42}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 215ms Template: 3ms
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