-; Test that weak functions and globals are placed into selectany COMDAT\r
-; sections with the mangled name as suffix. Ensure that the weak linkage\r
-; type is not ignored by the backend if the section was specialized.\r
-;\r
-; RUN: llc -mtriple=i686-pc-win32 %s -o - | FileCheck %s --check-prefix=X86\r
-; RUN: llc -mtriple=i686-pc-mingw32 %s -o - | FileCheck %s --check-prefix=X86\r
-; RUN: llc -mtriple=x86_64-pc-win32 %s -o - | FileCheck %s --check-prefix=X64\r
-; RUN: llc -mtriple=x86_64-pc-mingw32 %s -o - | FileCheck %s --check-prefix=X64\r
-\r
-; Mangled function\r
-; X86: .section .text,"xr",discard,__Z3foo\r
-; X86: .globl __Z3foo\r
-;\r
-; X64: .section .text,"xr",discard,_Z3foo\r
-; X64: .globl _Z3foo\r
-define weak void @_Z3foo() {\r
- ret void\r
-}\r
-\r
-; Unmangled function\r
-; X86: .section .sect,"xr",discard,_f\r
-; X86: .globl _f\r
-;\r
-; X64: .section .sect,"xr",discard,f\r
-; X64: .globl f\r
-define weak void @f() section ".sect" {\r
- ret void\r
-}\r
-\r
-; Weak global\r
-; X86: .section .data,"rd",discard,_a\r
-; X86: .globl _a\r
-; X86: .zero 12\r
-;\r
-; X64: .section .data,"rd",discard,a\r
-; X64: .globl a\r
-; X64: .zero 12\r
-@a = weak unnamed_addr constant { i32, i32, i32 } { i32 0, i32 0, i32 0}, section ".data"\r
-\r
-; X86: .section .tls$,"wd",discard,_b\r
-; X86: .globl _b\r
-; X86: .long 0\r
-;\r
-; X64: .section .tls$,"wd",discard,b\r
-; X64: .globl b\r
-; X64: .long 0\r
-\r
-@b = weak_odr thread_local global i32 0, align 4\r