[lld] 16343f0 - [ELF,test] Fix defsym.ll

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 12:50:02 PST 2024


Author: Fangrui Song
Date: 2024-01-23T12:49:57-08:00
New Revision: 16343f0db286a5d2aaf9494dd402cda0d088d0a1

URL: https://github.com/llvm/llvm-project/commit/16343f0db286a5d2aaf9494dd402cda0d088d0a1
DIFF: https://github.com/llvm/llvm-project/commit/16343f0db286a5d2aaf9494dd402cda0d088d0a1.diff

LOG: [ELF,test] Fix defsym.ll

Added: 
    

Modified: 
    lld/test/ELF/lto/defsym.ll

Removed: 
    


################################################################################
diff  --git a/lld/test/ELF/lto/defsym.ll b/lld/test/ELF/lto/defsym.ll
index 750c3936290665..142201889f5c73 100644
--- a/lld/test/ELF/lto/defsym.ll
+++ b/lld/test/ELF/lto/defsym.ll
@@ -1,17 +1,19 @@
 ; REQUIRES: x86
+; RUN: rm -rf %t && mkdir %t && cd %t
+
 ; LTO
-; RUN: llvm-as %s -o %t.o
-; RUN: llvm-as %S/Inputs/defsym-bar.ll -o %t1.o
-; RUN: ld.lld %t.o %t1.o -shared -o %t.so -defsym=bar2=bar3 -save-temps
-; RUN: llvm-readelf --symbols %t.so.lto.o | FileCheck --check-prefix=OBJ %s
-; RUN: llvm-objdump -d %t.so | FileCheck %s
+; RUN: llvm-as %s -o a.o
+; RUN: llvm-as %S/Inputs/defsym-bar.ll -o b.o
+; RUN: ld.lld a.o b.o -shared -o a.so -defsym=bar2=bar3 -save-temps
+; RUN: llvm-readelf --symbols a.so.lto.o | FileCheck --check-prefix=OBJ %s
+; RUN: llvm-objdump -d a.so | FileCheck %s
 
 ; ThinLTO
-; RUN: opt -module-summary %s -o %t.o
-; RUN: opt -module-summary %S/Inputs/defsym-bar.ll -o %t1.o
-; RUN: ld.lld %t.o %t1.o -shared -o %t2.so -defsym=bar2=bar3 -save-temps
-; RUN: llvm-readelf --symbols %t2.so1.lto.o | FileCheck --check-prefix=OBJ %s
-; RUN: llvm-objdump -d %t2.so | FileCheck %s
+; RUN: opt -module-summary %s -o a.o
+; RUN: opt -module-summary %S/Inputs/defsym-bar.ll -o b.o
+; RUN: ld.lld a.o b.o -shared -o a2.so -defsym=bar2=bar3 -save-temps
+; RUN: llvm-readelf --symbols a2.so1.lto.o | FileCheck --check-prefix=OBJ %s
+; RUN: llvm-objdump -d a2.so | FileCheck %s
 
 ; OBJ:  UND bar2
 


        


More information about the llvm-commits mailing list