3 ;; Test we don't get "duplicate symbol" error when bitcode/regular object
4 ;; comdats are used together.
6 ; RUN: llvm-as %s -o %t.o
7 ; RUN: llvm-mc -triple=x86_64-pc-linux %p/Inputs/comdat.s -o %t2.o -filetype=obj
8 ; RUN: ld.lld %t.o %t2.o -o %t.so -shared
9 ; RUN: llvm-readobj --symbols %t.so | FileCheck %s
10 ; RUN: ld.lld %t2.o %t.o -o %t2.so -shared
11 ; RUN: llvm-readobj --symbols %t2.so | FileCheck %s --check-prefix=OTHER
14 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
15 target triple = "x86_64-unknown-linux-gnu"
19 define protected void @foo() comdat($c) {
27 ; CHECK-NEXT: Binding: Global
28 ; CHECK-NEXT: Type: Function
30 ; CHECK-NEXT: STV_PROTECTED
32 ; CHECK-NEXT: Section: .text
39 ; OTHER-NEXT: Binding: Global
40 ; OTHER-NEXT: Type: None
42 ; OTHER-NEXT: STV_PROTECTED
44 ; OTHER-NEXT: Section: .text