llvm/test/tools/llvm-split/extern_linkage.ll
Evgeniy Stepanov b5a1802c6c Preserve extern_weak linkage in CloneModule.
Only force "extern" linkage if the function used to be a definition
in the source module. Declarations keep their original linkage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265043 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-31 20:21:31 +00:00

13 lines
369 B
LLVM

; Test that extern_weak linkage is preserved.
; RUN: llvm-split -o %t %s
; RUN: llvm-dis -o - %t0 | FileCheck %s
; RUN: llvm-dis -o - %t1 | FileCheck %s
; Both declarations are extern_weak in all partitions.
; CHECK: @x = extern_weak global i32, align 4
@x = extern_weak global i32, align 4
; CHECK: declare extern_weak void @f(...)
declare extern_weak void @f(...)