1 ; RUN: llc < %s | FileCheck %s
3 ; Check that we come up with appropriate section names that link.exe sorts
6 ; CHECK: .section .CRT$XCA00042,"dr"
9 ; CHECK: .section .CRT$XCC,"dr"
12 ; CHECK: .section .CRT$XCC00250,"dr"
15 ; CHECK: .section .CRT$XCL,"dr"
18 ; CHECK: .section .CRT$XCT12345,"dr"
21 ; CHECK: .section .CRT$XCT23456,"dr",associative,h
25 target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
26 target triple = "x86_64-pc-windows-msvc19.14.26433"
30 @h = linkonce_odr global i8 55, comdat, align 1
32 @str0 = private dso_local unnamed_addr constant [6 x i8] c"later\00", align 1
33 @str1 = private dso_local unnamed_addr constant [6 x i8] c"first\00", align 1
34 @str2 = private dso_local unnamed_addr constant [5 x i8] c"main\00", align 1
36 @llvm.global_ctors = appending global [6 x { i32, ptr, ptr }] [
37 { i32, ptr, ptr } { i32 12345, ptr @g, ptr null },
38 { i32, ptr, ptr } { i32 42, ptr @f, ptr null },
39 { i32, ptr, ptr } { i32 23456, ptr @init_h, ptr @h },
40 { i32, ptr, ptr } { i32 200, ptr @i, ptr null },
41 { i32, ptr, ptr } { i32 400, ptr @j, ptr null },
42 { i32, ptr, ptr } { i32 250, ptr @k, ptr null }
45 declare dso_local i32 @puts(ptr nocapture readonly) local_unnamed_addr
47 define dso_local void @g() {
49 %call = tail call i32 @puts(ptr @str0)
53 define dso_local void @f() {
55 %call = tail call i32 @puts(ptr @str1)
59 define dso_local void @init_h() {
65 define dso_local void @i() {
71 define dso_local void @j() {
77 define dso_local void @k() {
83 ; Function Attrs: nounwind uwtable
84 define dso_local i32 @main() local_unnamed_addr {
86 %call = tail call i32 @puts(ptr @str2)