summaryrefslogtreecommitdiffstats
path: root/tests/codegen/codemodels.rs
blob: 2328f5feb4e1ca6d12df76f3e2489cef3883413e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// only-x86_64

// revisions: NOMODEL MODEL-SMALL MODEL-KERNEL MODEL-MEDIUM MODEL-LARGE
//[NOMODEL] compile-flags:
//[MODEL-SMALL] compile-flags: -C code-model=small
//[MODEL-KERNEL] compile-flags: -C code-model=kernel
//[MODEL-MEDIUM] compile-flags: -C code-model=medium
//[MODEL-LARGE] compile-flags: -C code-model=large

#![crate_type = "lib"]

// MODEL-SMALL: !llvm.module.flags = !{{{.*}}}
// MODEL-SMALL: !{{[0-9]+}} = !{i32 1, !"Code Model", i32 1}
// MODEL-KERNEL: !llvm.module.flags = !{{{.*}}}
// MODEL-KERNEL: !{{[0-9]+}} = !{i32 1, !"Code Model", i32 2}
// MODEL-MEDIUM: !llvm.module.flags = !{{{.*}}}
// MODEL-MEDIUM: !{{[0-9]+}} = !{i32 1, !"Code Model", i32 3}
// MODEL-LARGE: !llvm.module.flags = !{{{.*}}}
// MODEL-LARGE: !{{[0-9]+}} = !{i32 1, !"Code Model", i32 4}
// NOMODEL-NOT: Code Model