diff options
| author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2016-03-31 20:21:31 +0000 |
|---|---|---|
| committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2016-03-31 20:21:31 +0000 |
| commit | a614ab7b71c36416c747ab73876519b6f0e7b74e (patch) | |
| tree | 641e81a10668235abc31fb39158a03cc282d52f6 /llvm/test/tools/llvm-split | |
| parent | 66c49f78a35625e6cd5f82af030b5919effb3182 (diff) | |
| download | bcm5719-llvm-a614ab7b71c36416c747ab73876519b6f0e7b74e.tar.gz bcm5719-llvm-a614ab7b71c36416c747ab73876519b6f0e7b74e.zip | |
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.
llvm-svn: 265043
Diffstat (limited to 'llvm/test/tools/llvm-split')
| -rw-r--r-- | llvm/test/tools/llvm-split/extern_linkage.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-split/extern_linkage.ll b/llvm/test/tools/llvm-split/extern_linkage.ll new file mode 100644 index 00000000000..d8dde7963e7 --- /dev/null +++ b/llvm/test/tools/llvm-split/extern_linkage.ll @@ -0,0 +1,12 @@ +; 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(...) |

