Skip to content

Commit 71c83fb

Browse files
committed
[LLD] Improve the lit tests added by 272bd6f
The `cp` command will copy the permission bits from the original file to the new one, which will cause permission denied (no written access) for the following "echo" command in some system. Switch to use `cat` which is more robust.
1 parent a2a1dbb commit 71c83fb

3 files changed

+3
-3
lines changed

lld/test/ELF/lto/devirt_validate_vtable_typeinfos.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
;; Common artifacts
44
; RUN: opt --thinlto-bc -o %t1.o %s
55
; RUN: opt --thinlto-bc --thinlto-split-lto-unit -o %t1_hybrid.o %s
6-
; RUN: cp %s %t1_regular.ll
6+
; RUN: cat %s > %t1_regular.ll
77
; RUN: echo '!llvm.module.flags = !{!12, !13}' >> %t1_regular.ll
88
; RUN: echo '!12 = !{i32 1, !"ThinLTO", i32 0}' >> %t1_regular.ll
99
; RUN: echo '!13 = !{i32 1, !"EnableSplitLTOUnit", i32 1}' >> %t1_regular.ll

lld/test/ELF/lto/devirt_validate_vtable_typeinfos_no_rtti.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
;; Common artifacts
44
; RUN: opt --thinlto-bc -o %t1.o %s
55
; RUN: opt --thinlto-bc --thinlto-split-lto-unit -o %t1_hybrid.o %s
6-
; RUN: cp %s %t1_regular.ll
6+
; RUN: cat %s > %t1_regular.ll
77
; RUN: echo '!llvm.module.flags = !{!6, !7}' >> %t1_regular.ll
88
; RUN: echo '!6 = !{i32 1, !"ThinLTO", i32 0}' >> %t1_regular.ll
99
; RUN: echo '!7 = !{i32 1, !"EnableSplitLTOUnit", i32 1}' >> %t1_regular.ll

lld/test/ELF/lto/devirt_validate_vtable_typeinfos_ref.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
;; Common artifacts
44
; RUN: opt --thinlto-bc -o %t1.o %s
55
; RUN: opt --thinlto-bc --thinlto-split-lto-unit -o %t1_hybrid.o %s
6-
; RUN: cp %s %t1_regular.ll
6+
; RUN: cat %s > %t1_regular.ll
77
; RUN: echo '!llvm.module.flags = !{!2, !3}' >> %t1_regular.ll
88
; RUN: echo '!2 = !{i32 1, !"ThinLTO", i32 0}' >> %t1_regular.ll
99
; RUN: echo '!3 = !{i32 1, !"EnableSplitLTOUnit", i32 1}' >> %t1_regular.ll

0 commit comments

Comments
 (0)