[NFC][RemoveDIs] Prefer iterators over inst-pointers in InstCombine
[llvm-project.git] / llvm / test / MC / COFF / weak-name.s
blob653232b2d4c29b6053177698df87ecf2e2d79208
1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s -defsym case=0 -o %t.case0.o
2 // RUN: llvm-readobj --symbols %t.case0.o | FileCheck %s --check-prefix=CHECK-CASE0
3 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s -defsym case=1 -o %t.case1.o
4 // RUN: llvm-readobj --symbols %t.case1.o | FileCheck %s --check-prefix=CHECK-CASE1
5 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s -defsym case=2 -o %t.case2.o
6 // RUN: llvm-readobj --symbols %t.case2.o | FileCheck %s --check-prefix=CHECK-CASE2
8 // Test that we prefer a non-comdat symbol for naming weak default symbols,
9 // if such a symbol is available.
11 .section .text$comdat1,"xr",discard,comdat1
12 .globl comdat1
13 comdat1:
14 call undeffunc
16 .weak weaksym
18 .section .text$comdat2,"xr",discard,comdat2
19 .globl comdat2
20 comdat2:
21 call undeffunc2
23 .if case == 0
24 .text
25 .globl regular
26 regular:
27 call undeffunc3
28 .elseif case == 1
29 .globl abssym
30 abssym = 42
31 .endif
33 // CHECK-CASE0: Name: .weak.weaksym.default.regular
34 // CHECK-CASE1: Name: .weak.weaksym.default.abssym
35 // CHECK-CASE2: Name: .weak.weaksym.default.comdat1