diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-12-02 22:59:04 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-12-02 22:59:04 +0000 |
| commit | 4b5ec2637384579ac64e3b6a8671282e6bedd028 (patch) | |
| tree | 23b222c64e584dd6b05ee77018a48c7edee912b7 /llvm/test/Linker | |
| parent | 71552ce64b161cc94c0bdbc69d6e2f72c54cf90e (diff) | |
| download | bcm5719-llvm-4b5ec2637384579ac64e3b6a8671282e6bedd028.tar.gz bcm5719-llvm-4b5ec2637384579ac64e3b6a8671282e6bedd028.zip | |
Switch the linker to having a whitelist of GVs.
This replaces DoNotLinkFromSource with ValuesToLink. It also moves the
computation of ValuesToLink earlier.
It is a bit simpler and an important step in slitting the linker into an
ir mover and a linker proper.
The test change is because we now avoid creating dead declarations.
llvm-svn: 254559
Diffstat (limited to 'llvm/test/Linker')
| -rw-r--r-- | llvm/test/Linker/funcimport.ll | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/test/Linker/funcimport.ll b/llvm/test/Linker/funcimport.ll index 1e6c0ec6484..38deafd3e3f 100644 --- a/llvm/test/Linker/funcimport.ll +++ b/llvm/test/Linker/funcimport.ll @@ -26,20 +26,20 @@ ; lazily linked and never referenced/materialized. ; RUN: llvm-link %t2.bc -functionindex=%t3.thinlto.bc -import=globalfunc1:%t.bc -S | FileCheck %s --check-prefix=IMPORTGLOB1 ; IMPORTGLOB1-DAG: define available_externally void @globalfunc1 -; IMPORTGLOB1-DAG: declare void @globalfunc2 ; IMPORTGLOB1-DAG: declare void @weakalias ; IMPORTGLOB1-DAG: declare void @analias -; IMPORTGLOB1-DAG: @linkoncealias = external global +; IMPORTGLOB1-NOT: @linkoncealias ; IMPORTGLOB1-NOT: @linkoncefunc +; IMPORTGLOB1-NOT: declare void @globalfunc2 ; Ensure that weak alias to a non-imported function is correctly ; turned into a declaration, but that strong alias to an imported function ; is imported as alias. ; RUN: llvm-link %t2.bc -functionindex=%t3.thinlto.bc -import=globalfunc2:%t.bc -S | FileCheck %s --check-prefix=IMPORTGLOB2 ; IMPORTGLOB2-DAG: declare void @analias -; IMPORTGLOB2-DAG: declare void @globalfunc1 ; IMPORTGLOB2-DAG: define available_externally void @globalfunc2 ; IMPORTGLOB2-DAG: declare void @weakalias +; IMPORTGLOB2-NOT: declare void @globalfunc1 ; Ensure that strong alias imported in second pass of importing ends up ; as an alias. @@ -98,9 +98,9 @@ ; reference should turned into an external_weak declaration. ; RUN: llvm-link %t2.bc -functionindex=%t3.thinlto.bc -import=callweakfunc:%t.bc -import=weakfunc:%t.bc -S 2>&1 | FileCheck %s --check-prefix=IMPORTWEAKFUNC ; IMPORTWEAKFUNC-DAG: Ignoring import request for weak-any function weakfunc -; IMPORTWEAKFUNC-DAG: @weakvar = extern_weak global i32, align 4 ; IMPORTWEAKFUNC-DAG: declare extern_weak void @weakfunc ; IMPORTWEAKFUNC-DAG: define available_externally void @callweakfunc +; IMPORTWEAKFUNC-NOT: @weakvar = extern_weak global i32, align 4 @globalvar = global i32 1, align 4 @staticvar = internal global i32 1, align 4 |

