1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/test/tools/gold/X86/comdat2.ll
Rafael Espindola 94e602fadd Add a passing test.
When a comdat is discarded, any globals defined in it become undefined.

llvm-svn: 254258
2015-11-29 15:52:12 +00:00

20 lines
445 B
LLVM

; RUN: llvm-as %s -o %t.bc
; RUN: llvm-as %p/Inputs/comdat2.ll -o %t2.bc
; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
; RUN: --plugin-opt=emit-llvm \
; RUN: -shared %t.bc %t2.bc -o %t3.bc
; RUN: llvm-dis %t3.bc -o - | FileCheck %s
$foo = comdat any
@foo = global i8 0, comdat
; CHECK: @foo = global i8 0, comdat
; CHECK: define void @zed() {
; CHECK: call void @bar()
; CHECK: ret void
; CHECK: }
; CHECK: declare void @bar()