2016-03-23 06:31:34 +08:00
|
|
|
; REQUIRES: x86
|
|
|
|
; RUN: llvm-as %p/Inputs/linkonce-odr.ll -o %t1.o
|
2016-03-29 16:35:42 +08:00
|
|
|
; RUN: llc -relocation-model=pic %s -o %t2.o -filetype=obj
|
2016-03-24 02:13:32 +08:00
|
|
|
; RUN: ld.lld %t1.o %t2.o -o %t.so -shared -save-temps
|
2016-09-29 08:40:08 +08:00
|
|
|
; RUN: llvm-dis %t.so.0.4.opt.bc -o - | FileCheck %s
|
2016-03-23 06:31:34 +08:00
|
|
|
|
|
|
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
declare void @f()
|
|
|
|
|
|
|
|
define void @g() {
|
2016-03-23 07:19:40 +08:00
|
|
|
call void @f()
|
|
|
|
ret void
|
|
|
|
}
|
2016-03-23 06:31:34 +08:00
|
|
|
|
2016-03-24 02:15:06 +08:00
|
|
|
; Be sure that 'f' is kept and has weak_odr linkage.
|
2016-03-24 02:13:32 +08:00
|
|
|
; CHECK: define weak_odr void @f()
|