diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-12-09 22:44:00 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-12-09 22:44:00 +0000 |
commit | fad81ab170b3d422f0aaa15b88157fdb16d3e75d (patch) | |
tree | 572573d375b1a193ce2a7bea6b1490bbc7f6c658 /test/Linker | |
parent | 49c4c7b2a7d8630c7c30cfb7089d9b2e2c18946c (diff) |
Synchronize the logic for deciding to link a gv.
We were deciding to not link an available_externally gv over a
declaration, but then copying over the body anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255169 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Linker')
-rw-r--r-- | test/Linker/Inputs/available_externally_over_decl.ll | 5 | ||||
-rw-r--r-- | test/Linker/available_externally_over_decl.ll | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/test/Linker/Inputs/available_externally_over_decl.ll b/test/Linker/Inputs/available_externally_over_decl.ll new file mode 100644 index 00000000000..b440fde9214 --- /dev/null +++ b/test/Linker/Inputs/available_externally_over_decl.ll @@ -0,0 +1,5 @@ +@h = global void ()* @f + +define available_externally void @f() { + ret void +} diff --git a/test/Linker/available_externally_over_decl.ll b/test/Linker/available_externally_over_decl.ll new file mode 100644 index 00000000000..e220b17edf7 --- /dev/null +++ b/test/Linker/available_externally_over_decl.ll @@ -0,0 +1,9 @@ +; RUN: llvm-link -S %s %p/Inputs/available_externally_over_decl.ll | FileCheck %s + +declare void @f() + +define void ()* @main() { + ret void ()* @f +} + +; CHECK: define available_externally void @f() { |