1 ; RUN: llvm-as %s -o - | llvm-dis - | FileCheck %s
3 ; The IRUpgrader turns a i32 type "Objective-C Garbage Collection"
4 ; into i8 value. If the higher bits are set, it adds the module flag for swift info.
6 target triple = "x86_64-apple-macosx10.15.0"
8 @__swift_reflection_version = linkonce_odr hidden constant i16 3
9 @llvm.used = appending global [1 x i8*] [i8* bitcast (i16* @__swift_reflection_version to i8*)], section "llvm.metadata", align 8
11 define i32 @main(i32 %0, i8** %1) #0 {
12 %3 = bitcast i8** %1 to i8*
16 attributes #0 = { "frame-pointer"="all" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" }
18 !llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
19 !swift.module.flags = !{!9}
20 !llvm.linker.options = !{!10, !11, !12}
21 !llvm.asan.globals = !{!13}
23 !0 = !{i32 2, !"SDK Version", [2 x i32] [i32 10, i32 15]}
24 !1 = !{i32 1, !"Objective-C Version", i32 2}
25 !2 = !{i32 1, !"Objective-C Image Info Version", i32 0}
26 !3 = !{i32 1, !"Objective-C Image Info Section", !"__DATA,__objc_imageinfo,regular,no_dead_strip"}
27 !4 = !{i32 4, !"Objective-C Garbage Collection", i32 83953408}
28 !5 = !{i32 1, !"Objective-C Class Properties", i32 64}
29 !6 = !{i32 1, !"wchar_size", i32 4}
30 !7 = !{i32 7, !"PIC Level", i32 2}
31 !8 = !{i32 1, !"Swift Version", i32 7}
32 !9 = !{!"standard-library", i1 false}
33 !10 = !{!"-lswiftSwiftOnoneSupport"}
34 !11 = !{!"-lswiftCore"}
36 !13 = !{[1 x i8*]* @llvm.used, null, null, i1 false, i1 true}
38 ; CHECK: !{{[0-9]+}} = !{i32 1, !"Objective-C Garbage Collection", i8 0}
39 ; CHECK: !{{[0-9]+}} = !{i32 1, !"Swift ABI Version", i32 7}
40 ; CHECK: !{{[0-9]+}} = !{i32 1, !"Swift Major Version", i8 5}
41 ; CHECK: !{{[0-9]+}} = !{i32 1, !"Swift Minor Version", i8 1}