diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-12-02 19:30:52 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-12-02 19:30:52 +0000 |
commit | 21fca5ddcedd4c19303b08aaf1bf6b71399db7b4 (patch) | |
tree | 51e028e9931f4005bc7c7660142528eb883e0d2b /test/Linker/comdat14.ll | |
parent | 325a79d6e98b9192276abe7421ba491fae199446 (diff) |
Fix linking when we copy over only a decl.
We were failing to copy the fact that the GV is weak and in the case of
an alias, producing invalid IR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254538 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Linker/comdat14.ll')
-rw-r--r-- | test/Linker/comdat14.ll | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Linker/comdat14.ll b/test/Linker/comdat14.ll new file mode 100644 index 00000000000..70d1142bdf9 --- /dev/null +++ b/test/Linker/comdat14.ll @@ -0,0 +1,9 @@ +; RUN: llvm-link -S %s %p/Inputs/comdat14.ll -o - | FileCheck %s + +$c = comdat any + +@v = global i32 0, comdat ($c) + +; CHECK: @v = global i32 0, comdat($c) +; CHECK: @v2 = extern_weak global i32 +; CHECK: @v3 = extern_weak global i32 |