diff options
Diffstat (limited to 'llvm/test/Linker/funcimport.ll')
| -rw-r--r-- | llvm/test/Linker/funcimport.ll | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/llvm/test/Linker/funcimport.ll b/llvm/test/Linker/funcimport.ll index 38deafd3e3f..8dd0e1587c8 100644 --- a/llvm/test/Linker/funcimport.ll +++ b/llvm/test/Linker/funcimport.ll @@ -1,18 +1,18 @@ ; First ensure that the ThinLTO handling in llvm-link and llvm-lto handles -; bitcode without function summary sections gracefully. +; bitcode without summary sections gracefully. ; RUN: llvm-as %s -o %t.bc ; RUN: llvm-as %p/Inputs/funcimport.ll -o %t2.bc -; RUN: llvm-link %t.bc -functionindex=%t.bc -S +; RUN: llvm-link %t.bc -summary-index=%t.bc -S ; RUN: llvm-lto -thinlto -o %t3 %t.bc %t2.bc ; Do setup work for all below tests: generate bitcode and combined index -; RUN: llvm-as -function-summary %s -o %t.bc -; RUN: llvm-as -function-summary %p/Inputs/funcimport.ll -o %t2.bc +; RUN: llvm-as -module-summary %s -o %t.bc +; RUN: llvm-as -module-summary %p/Inputs/funcimport.ll -o %t2.bc ; RUN: llvm-lto -thinlto -o %t3 %t.bc %t2.bc ; Ensure statics are promoted/renamed correctly from this file (all but ; constant variable need promotion). -; RUN: llvm-link %t.bc -functionindex=%t3.thinlto.bc -S | FileCheck %s --check-prefix=EXPORTSTATIC +; RUN: llvm-link %t.bc -summary-index=%t3.thinlto.bc -S | FileCheck %s --check-prefix=EXPORTSTATIC ; EXPORTSTATIC-DAG: @staticvar.llvm.1 = hidden global ; EXPORTSTATIC-DAG: @staticconstvar = internal unnamed_addr constant ; EXPORTSTATIC-DAG: @P.llvm.1 = hidden global void ()* null @@ -24,7 +24,7 @@ ; Also ensures that alias to a linkonce function is turned into a declaration ; and that the associated linkonce function is not in the output, as it is ; 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 +; RUN: llvm-link %t2.bc -summary-index=%t3.thinlto.bc -import=globalfunc1:%t.bc -S | FileCheck %s --check-prefix=IMPORTGLOB1 ; IMPORTGLOB1-DAG: define available_externally void @globalfunc1 ; IMPORTGLOB1-DAG: declare void @weakalias ; IMPORTGLOB1-DAG: declare void @analias @@ -35,7 +35,7 @@ ; 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 +; RUN: llvm-link %t2.bc -summary-index=%t3.thinlto.bc -import=globalfunc2:%t.bc -S | FileCheck %s --check-prefix=IMPORTGLOB2 ; IMPORTGLOB2-DAG: declare void @analias ; IMPORTGLOB2-DAG: define available_externally void @globalfunc2 ; IMPORTGLOB2-DAG: declare void @weakalias @@ -43,7 +43,7 @@ ; Ensure that strong alias imported in second pass of importing ends up ; as an alias. -; RUN: llvm-link %t2.bc -functionindex=%t3.thinlto.bc -import=globalfunc1:%t.bc -import=globalfunc2:%t.bc -S | FileCheck %s --check-prefix=IMPORTGLOB3 +; RUN: llvm-link %t2.bc -summary-index=%t3.thinlto.bc -import=globalfunc1:%t.bc -import=globalfunc2:%t.bc -S | FileCheck %s --check-prefix=IMPORTGLOB3 ; IMPORTGLOB3-DAG: declare void @analias ; IMPORTGLOB3-DAG: define available_externally void @globalfunc1 ; IMPORTGLOB3-DAG: define available_externally void @globalfunc2 @@ -52,7 +52,7 @@ ; Ensure that strong alias imported in first pass of importing ends up ; as an alias, and that seeing the alias definition during a second inlining ; pass is handled correctly. -; RUN: llvm-link %t2.bc -functionindex=%t3.thinlto.bc -import=globalfunc2:%t.bc -import=globalfunc1:%t.bc -S | FileCheck %s --check-prefix=IMPORTGLOB4 +; RUN: llvm-link %t2.bc -summary-index=%t3.thinlto.bc -import=globalfunc2:%t.bc -import=globalfunc1:%t.bc -S | FileCheck %s --check-prefix=IMPORTGLOB4 ; IMPORTGLOB4-DAG: declare void @analias ; IMPORTGLOB4-DAG: define available_externally void @globalfunc2 ; IMPORTGLOB4-DAG: define available_externally void @globalfunc1 @@ -60,13 +60,13 @@ ; An alias to an imported function is imported as alias if the function is not ; available_externally. -; RUN: llvm-link %t2.bc -functionindex=%t3.thinlto.bc -import=linkoncefunc:%t.bc -S | FileCheck %s --check-prefix=IMPORTGLOB5 +; RUN: llvm-link %t2.bc -summary-index=%t3.thinlto.bc -import=linkoncefunc:%t.bc -S | FileCheck %s --check-prefix=IMPORTGLOB5 ; IMPORTGLOB5-DAG: linkoncealias = alias void (...), bitcast (void ()* @linkoncefunc to void (...)*) ; IMPORTGLOB5-DAG: define linkonce_odr void @linkoncefunc() ; Ensure that imported static variable and function references are correctly ; promoted and renamed (including static constant variable). -; RUN: llvm-link %t2.bc -functionindex=%t3.thinlto.bc -import=referencestatics:%t.bc -S | FileCheck %s --check-prefix=IMPORTSTATIC +; RUN: llvm-link %t2.bc -summary-index=%t3.thinlto.bc -import=referencestatics:%t.bc -S | FileCheck %s --check-prefix=IMPORTSTATIC ; IMPORTSTATIC-DAG: @staticvar.llvm.1 = available_externally hidden global ; IMPORTSTATIC-DAG: @staticconstvar.llvm.1 = internal unnamed_addr constant ; IMPORTSTATIC-DAG: define available_externally i32 @referencestatics @@ -77,18 +77,18 @@ ; Ensure that imported global (external) function and variable references ; are handled correctly (including referenced variable imported as ; available_externally definition) -; RUN: llvm-link %t2.bc -functionindex=%t3.thinlto.bc -import=referenceglobals:%t.bc -S | FileCheck %s --check-prefix=IMPORTGLOBALS +; RUN: llvm-link %t2.bc -summary-index=%t3.thinlto.bc -import=referenceglobals:%t.bc -S | FileCheck %s --check-prefix=IMPORTGLOBALS ; IMPORTGLOBALS-DAG: @globalvar = available_externally global ; IMPORTGLOBALS-DAG: declare void @globalfunc1() ; IMPORTGLOBALS-DAG: define available_externally i32 @referenceglobals ; Ensure that common variable correctly imported as common defition. -; RUN: llvm-link %t2.bc -functionindex=%t3.thinlto.bc -import=referencecommon:%t.bc -S | FileCheck %s --check-prefix=IMPORTCOMMON +; RUN: llvm-link %t2.bc -summary-index=%t3.thinlto.bc -import=referencecommon:%t.bc -S | FileCheck %s --check-prefix=IMPORTCOMMON ; IMPORTCOMMON-DAG: @commonvar = common global ; IMPORTCOMMON-DAG: define available_externally i32 @referencecommon ; Ensure that imported static function pointer correctly promoted and renamed. -; RUN: llvm-link %t2.bc -functionindex=%t3.thinlto.bc -import=callfuncptr:%t.bc -S | FileCheck %s --check-prefix=IMPORTFUNCPTR +; RUN: llvm-link %t2.bc -summary-index=%t3.thinlto.bc -import=callfuncptr:%t.bc -S | FileCheck %s --check-prefix=IMPORTFUNCPTR ; IMPORTFUNCPTR-DAG: @P.llvm.1 = available_externally hidden global void ()* null ; IMPORTFUNCPTR-DAG: define available_externally void @callfuncptr ; IMPORTFUNCPTR-DAG: %0 = load void ()*, void ()** @P.llvm.1 @@ -96,7 +96,7 @@ ; Ensure that imported weak function reference/definition handled properly. ; Imported weak_any definition should be skipped with warning, and imported ; 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 +; RUN: llvm-link %t2.bc -summary-index=%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: declare extern_weak void @weakfunc ; IMPORTWEAKFUNC-DAG: define available_externally void @callweakfunc |

