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$XCT12345,"dr"
12 ; CHECK: .section .CRT$XCT23456,"dr",associative,h
16 target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
17 target triple = "x86_64-pc-windows-msvc19.14.26433"
21 @h = linkonce_odr global i8 55, comdat, align 1
23 @str0 = private dso_local unnamed_addr constant [6 x i8] c"later\00", align 1
24 @str1 = private dso_local unnamed_addr constant [6 x i8] c"first\00", align 1
25 @str2 = private dso_local unnamed_addr constant [5 x i8] c"main\00", align 1
27 @llvm.global_ctors = appending global [3 x { i32, void ()*, i8* }] [
28 { i32, void ()*, i8* } { i32 12345, void ()* @g, i8* null },
29 { i32, void ()*, i8* } { i32 42, void ()* @f, i8* null },
30 { i32, void ()*, i8* } { i32 23456, void ()* @init_h, i8* @h }
33 declare dso_local i32 @puts(i8* nocapture readonly) local_unnamed_addr
35 define dso_local void @g() {
37 %call = tail call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str0, i64 0, i64 0))
41 define dso_local void @f() {
43 %call = tail call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str1, i64 0, i64 0))
47 define dso_local void @init_h() {
54 ; Function Attrs: nounwind uwtable
55 define dso_local i32 @main() local_unnamed_addr {
57 %call = tail call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str2, i64 0, i64 0))