[llvm] 3201277 - [test] Explain the purpose of LLVM :: LTO/Resolution/X86/local-def-dllimport.ll

Matthew Voss via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 9 13:15:25 PDT 2023


Author: Matthew Voss
Date: 2023-06-09T13:15:02-07:00
New Revision: 32012771d4e6c5aa157ed3857cdf77eadcf632bc

URL: https://github.com/llvm/llvm-project/commit/32012771d4e6c5aa157ed3857cdf77eadcf632bc
DIFF: https://github.com/llvm/llvm-project/commit/32012771d4e6c5aa157ed3857cdf77eadcf632bc.diff

LOG: [test] Explain the purpose of LLVM :: LTO/Resolution/X86/local-def-dllimport.ll

Requested in https://reviews.llvm.org/D148950#4315575

Added: 
    

Modified: 
    llvm/test/LTO/Resolution/X86/local-def-dllimport.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/LTO/Resolution/X86/local-def-dllimport.ll b/llvm/test/LTO/Resolution/X86/local-def-dllimport.ll
index 2dcd7ee64fa29..7b00138b34986 100644
--- a/llvm/test/LTO/Resolution/X86/local-def-dllimport.ll
+++ b/llvm/test/LTO/Resolution/X86/local-def-dllimport.ll
@@ -1,3 +1,8 @@
+; If a function has linkage "available_externally", make sure that a dllimport
+; attribute is not dropped. The library definition (with a dllexport attribute)
+; might be in a shared library, rather than merged into this module. Since we
+; can't guaranty the definition is available locally, the dllimport attribute
+; may be used by later passes and should be preserved.
 ; RUN: opt -thinlto-bc -thinlto-split-lto-unit -o %t0.bc %s
 ; RUN: llvm-lto2 run -r %t0.bc,__imp_f,l \
 ; RUN:               -r %t0.bc,g,p \


        


More information about the llvm-commits mailing list