Skip to content

Commit 1f67757

Browse files
boomanaiden154krishna2803
authored andcommitted
[llvm] Remove uses of %T in tests (llvm#151621)
This patch removes all uses of %T from within LLVM tests. %T has been deprecated for about seven years and use is not advised given it is not unique per test and can thus lead to races. The goal of this is to eventually remove support for %T from lit.
1 parent 3b42d54 commit 1f67757

File tree

13 files changed

+121
-116
lines changed

13 files changed

+121
-116
lines changed

llvm/test/DebugInfo/PDB/obj-globalhash.test

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
RUN: yaml2obj %p/Inputs/obj-hashes-1.yaml -o %T/obj-hashes-1.obj
2-
RUN: yaml2obj %p/Inputs/obj-hashes-2.yaml -o %T/obj-hashes-2.obj
3-
RUN: echo obj-hashes-1 > %T/hashes-combined.out
4-
RUN: llvm-pdbutil dump -type-extras %T/obj-hashes-1.obj >> %T/hashes-combined.out
5-
RUN: echo obj-hashes-2 >> %T/hashes-combined.out
6-
RUN: llvm-pdbutil dump -type-extras %T/obj-hashes-2.obj >> %T/hashes-combined.out
7-
RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-ONE %s
8-
RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-TWO %s
9-
RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-THREE %s
10-
RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-FOUR %s
11-
RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-FIVE %s
12-
RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-SIX %s
1+
RUN: yaml2obj %p/Inputs/obj-hashes-1.yaml -o %t.obj-hashes-1.obj
2+
RUN: yaml2obj %p/Inputs/obj-hashes-2.yaml -o %t.obj-hashes-2.obj
3+
RUN: echo obj-hashes-1 > %t.hashes-combined.out
4+
RUN: llvm-pdbutil dump -type-extras %t.obj-hashes-1.obj >> %t.hashes-combined.out
5+
RUN: echo obj-hashes-2 >> %t.hashes-combined.out
6+
RUN: llvm-pdbutil dump -type-extras %t.obj-hashes-2.obj >> %t.hashes-combined.out
7+
RUN: cat %t.hashes-combined.out | FileCheck --check-prefix=CHECK-ONE %s
8+
RUN: cat %t.hashes-combined.out | FileCheck --check-prefix=CHECK-TWO %s
9+
RUN: cat %t.hashes-combined.out | FileCheck --check-prefix=CHECK-THREE %s
10+
RUN: cat %t.hashes-combined.out | FileCheck --check-prefix=CHECK-FOUR %s
11+
RUN: cat %t.hashes-combined.out | FileCheck --check-prefix=CHECK-FIVE %s
12+
RUN: cat %t.hashes-combined.out | FileCheck --check-prefix=CHECK-SIX %s
1313

1414
; char**. Both the local and global hashes should be the same, since the only
1515
; back-references are for simple types which have fixed indices.
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# RUN: opt -module-summary %p/Inputs/main-mod.ll -o %T/main-mod.bc
2-
# RUN: opt -module-summary %p/Inputs/foo-mod.ll -o %T/foo-mod.bc
3-
# RUN: opt -module-summary %p/Inputs/bar-mod.ll -o %T/bar-mod.bc
1+
# RUN: opt -module-summary %p/Inputs/main-mod.ll -o %t.main-mod.bc
2+
# RUN: opt -module-summary %p/Inputs/foo-mod.ll -o %t.foo-mod.bc
3+
# RUN: opt -module-summary %p/Inputs/bar-mod.ll -o %t.bar-mod.bc
44

55
# REQUIRES: default_triple
66
# UNSUPPORTED: target=powerpc64{{.*}}
77

8-
# RUN: llvm-lto -thinlto -o %T/main-foo-bar %T/main-mod.bc %T/foo-mod.bc %T/bar-mod.bc
8+
# RUN: llvm-lto -thinlto -o %t.main-foo-bar %t.main-mod.bc %t.foo-mod.bc %t.bar-mod.bc
99

10-
# RUN: LLJITWithThinLTOSummaries %T/main-foo-bar.thinlto.bc 2>&1 | FileCheck %s
10+
# RUN: LLJITWithThinLTOSummaries %t.main-foo-bar.thinlto.bc 2>&1 | FileCheck %s
1111

12-
# CHECK: About to load module: {{.*}}/main-mod.bc
13-
# CHECK-DAG: About to load module: {{.*}}/foo-mod.bc
14-
# CHECK-DAG: About to load module: {{.*}}/bar-mod.bc
12+
# CHECK: About to load module: {{.*}}main-mod.bc
13+
# CHECK-DAG: About to load module: {{.*}}foo-mod.bc
14+
# CHECK-DAG: About to load module: {{.*}}bar-mod.bc
1515
# CHECK: 'main' finished with exit code: 0

llvm/test/ExecutionEngine/JITLink/x86-64/MachO_foo-in-weak-dylib.s

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# RUN: yaml2obj -o %T/libfoo.dylib %S/Inputs/libFooUniversalDylib.yaml
1+
# RUN: yaml2obj -o %t.libfoo.dylib %S/Inputs/libFooUniversalDylib.yaml
22
# RUN: llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj \
3-
# RUN: -o %T/MachO_foo-in-weak-dylib.o %s
4-
# RUN: llvm-jitlink -noexec %T/MachO_foo-in-weak-dylib.o \
5-
# RUN: -weak_library %T/libfoo.dylib
3+
# RUN: -o %t.MachO_foo-in-weak-dylib.o %s
4+
# RUN: llvm-jitlink -noexec %t.MachO_foo-in-weak-dylib.o \
5+
# RUN: -weak_library %t.libfoo.dylib
66
#
77
# Check that -weak_library supports universal binaries.
88

llvm/test/MC/AArch64/ELF_ARM64_large-relocations.s

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# RUN: llvm-mc -triple=arm64-none-linux-gnu -large-code-model -filetype=obj -o %T/large-reloc.o %s
2-
# RUN: llvm-rtdyld -triple=arm64-none-linux-gnu -verify -map-section large-reloc.o,.eh_frame=0x10000 -map-section large-reloc.o,.text=0xffff000000000000 -check=%s %T/large-reloc.o
3-
# RUN: llvm-mc -triple=aarch64_be-none-linux-gnu -large-code-model -filetype=obj -o %T/large-reloc.o %s
4-
# RUN: llvm-rtdyld -triple=aarch64_be-none-linux-gnu -verify -map-section large-reloc.o,.eh_frame=0x10000 -map-section large-reloc.o,.text=0xffff000000000000 -check=%s %T/large-reloc.o
1+
# RUN: rm -rf %t && mkdir %t && cd %t
2+
# RUN: llvm-mc -triple=arm64-none-linux-gnu -large-code-model -filetype=obj -o large-reloc.o %s
3+
# RUN: llvm-rtdyld -triple=arm64-none-linux-gnu -verify -map-section large-reloc.o,.eh_frame=0x10000 -map-section large-reloc.o,.text=0xffff000000000000 -check=%s large-reloc.o
4+
# RUN: llvm-mc -triple=aarch64_be-none-linux-gnu -large-code-model -filetype=obj -o large-reloc.o %s
5+
# RUN: llvm-rtdyld -triple=aarch64_be-none-linux-gnu -verify -map-section large-reloc.o,.eh_frame=0x10000 -map-section large-reloc.o,.text=0xffff000000000000 -check=%s large-reloc.o
56

67
.text
78
.globl g

llvm/test/Object/archive-darwin-duplicates.test

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ The two members with the duplicated name "test.o" must have unique
44
non-zero timestamps, while baz.o, being unique, remains a zero
55
timestamp.
66

7-
RUN: mkdir -p %T/sub1
8-
RUN: printf test > %T/test.o
9-
RUN: printf sub1/test > %T/sub1/test.o
10-
RUN: printf baz > %T/baz.o
7+
RUN: mkdir -p %t.dir/sub1
8+
RUN: printf test > %t.dir/test.o
9+
RUN: printf sub1/test > %t.dir/sub1/test.o
10+
RUN: printf baz > %t.dir/baz.o
1111

1212
RUN: rm -f %t.a
13-
RUN: llvm-ar --format=darwin rcs %t.a %T/sub1/test.o %T/test.o %T/baz.o
13+
RUN: llvm-ar --format=darwin rcs %t.a %t.dir/sub1/test.o %t.dir/test.o %t.dir/baz.o
1414
RUN: FileCheck -strict-whitespace %s < %t.a
1515

1616
CHECK:#1/12 1 0 0 644 28 `

llvm/test/TableGen/GlobalISelEmitter/ContextlessPredicates.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// RUN: llvm-tblgen -gen-global-isel -I %p/../../../include -I %p/../Common -optimize-match-table=false %s -o %T/context-non-optimized.cpp
2-
// RUN: FileCheck %s --check-prefixes=CHECK_NOPT -input-file=%T/context-non-optimized.cpp
3-
// RUN: llvm-tblgen -gen-global-isel -I %p/../../../include -I %p/../Common -optimize-match-table=true %s -o %T/context-optimized.cpp
4-
// RUN: FileCheck %s --check-prefixes=CHECK_OPT -input-file=%T/context-optimized.cpp
1+
// RUN: llvm-tblgen -gen-global-isel -I %p/../../../include -I %p/../Common -optimize-match-table=false %s -o %t.context-non-optimized.cpp
2+
// RUN: FileCheck %s --check-prefixes=CHECK_NOPT -input-file=%t.context-non-optimized.cpp
3+
// RUN: llvm-tblgen -gen-global-isel -I %p/../../../include -I %p/../Common -optimize-match-table=true %s -o %t.context-optimized.cpp
4+
// RUN: FileCheck %s --check-prefixes=CHECK_OPT -input-file=%t.context-optimized.cpp
55

66

77

llvm/test/TableGen/GlobalISelEmitter/GlobalISelEmitter.td

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
// RUN: llvm-tblgen -gen-global-isel -I %p/../../../include -I %p/../Common -optimize-match-table=false %s -o %T/non-optimized.cpp
2-
// RUN: llvm-tblgen -gen-global-isel -I %p/../../../include -I %p/../Common -optimize-match-table=true %s -o %T/optimized.cpp
3-
// RUN: llvm-tblgen -gen-global-isel -I %p/../../../include -I %p/../Common %s -o %T/default.cpp
1+
// RUN: llvm-tblgen -gen-global-isel -I %p/../../../include -I %p/../Common -optimize-match-table=false %s -o %t.non-optimized.cpp
2+
// RUN: llvm-tblgen -gen-global-isel -I %p/../../../include -I %p/../Common -optimize-match-table=true %s -o %t.optimized.cpp
3+
// RUN: llvm-tblgen -gen-global-isel -I %p/../../../include -I %p/../Common %s -o %t.default.cpp
44

5-
// RUN: FileCheck %s --check-prefixes=CHECK,R19C,R19N -input-file=%T/non-optimized.cpp
6-
// RUN: FileCheck %s --check-prefixes=CHECK,R19C,R19O -input-file=%T/optimized.cpp
5+
// RUN: FileCheck %s --check-prefixes=CHECK,R19C,R19N -input-file=%t.non-optimized.cpp
6+
// RUN: FileCheck %s --check-prefixes=CHECK,R19C,R19O -input-file=%t.optimized.cpp
77

8-
// RUN: FileCheck %s --check-prefixes=CHECK,R21C,R21N -input-file=%T/non-optimized.cpp
9-
// RUN: FileCheck %s --check-prefixes=CHECK,R21C,R21O -input-file=%T/optimized.cpp
8+
// RUN: FileCheck %s --check-prefixes=CHECK,R21C,R21N -input-file=%t.non-optimized.cpp
9+
// RUN: FileCheck %s --check-prefixes=CHECK,R21C,R21O -input-file=%t.optimized.cpp
1010

11-
// RUN: FileCheck %s --check-prefixes=CHECK,R20C,R20N -input-file=%T/non-optimized.cpp
12-
// RUN: FileCheck %s --check-prefixes=CHECK,R20C,R20O -input-file=%T/optimized.cpp
11+
// RUN: FileCheck %s --check-prefixes=CHECK,R20C,R20N -input-file=%t.non-optimized.cpp
12+
// RUN: FileCheck %s --check-prefixes=CHECK,R20C,R20O -input-file=%t.optimized.cpp
1313

14-
// RUN: FileCheck %s --check-prefixes=CHECK,R00C,R00N -input-file=%T/non-optimized.cpp
15-
// RUN: FileCheck %s --check-prefixes=CHECK,R00C,R00O -input-file=%T/optimized.cpp
14+
// RUN: FileCheck %s --check-prefixes=CHECK,R00C,R00N -input-file=%t.non-optimized.cpp
15+
// RUN: FileCheck %s --check-prefixes=CHECK,R00C,R00O -input-file=%t.optimized.cpp
1616

17-
// RUN: FileCheck %s --check-prefixes=CHECK,R01C,R01N -input-file=%T/non-optimized.cpp
18-
// RUN: FileCheck %s --check-prefixes=CHECK,R01C,R01O -input-file=%T/optimized.cpp
17+
// RUN: FileCheck %s --check-prefixes=CHECK,R01C,R01N -input-file=%t.non-optimized.cpp
18+
// RUN: FileCheck %s --check-prefixes=CHECK,R01C,R01O -input-file=%t.optimized.cpp
1919

20-
// RUN: FileCheck %s --check-prefixes=CHECK,R02C,R02N,NOOPT -input-file=%T/non-optimized.cpp
21-
// RUN: FileCheck %s --check-prefixes=CHECK,R02C,R02O -input-file=%T/optimized.cpp
20+
// RUN: FileCheck %s --check-prefixes=CHECK,R02C,R02N,NOOPT -input-file=%t.non-optimized.cpp
21+
// RUN: FileCheck %s --check-prefixes=CHECK,R02C,R02O -input-file=%t.optimized.cpp
2222

23-
// RUN: diff %T/default.cpp %T/optimized.cpp
23+
// RUN: diff %t.default.cpp %t.optimized.cpp
2424

2525
include "llvm/Target/Target.td"
2626
include "GlobalISelEmitterCommon.td"

llvm/test/TableGen/GlobalISelEmitter/HwModes.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: llvm-tblgen -gen-global-isel -I %p/../../../include -I %p/../Common -optimize-match-table=false %s -o %T/hwmode-non-optimized.cpp
2-
// RUN: FileCheck %s --check-prefixes=CHECK -input-file=%T/hwmode-non-optimized.cpp
1+
// RUN: llvm-tblgen -gen-global-isel -I %p/../../../include -I %p/../Common -optimize-match-table=false %s -o %t.hwmode-non-optimized.cpp
2+
// RUN: FileCheck %s --check-prefixes=CHECK -input-file=%t.hwmode-non-optimized.cpp
33

44
include "llvm/Target/Target.td"
55

llvm/test/tools/UpdateTestChecks/update_llc_test_checks/amdgpu-no-merge-comments.test

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
# Replace llc with cat, so we can simulate hypothetical output without actually running llc.
55
# Copy the simulated output to the temporary directory.
6-
# RUN: cp -f %S/Inputs/amdgpu_no_merge_comments-O0.s %T/ && cp -f %S/Inputs/amdgpu_no_merge_comments-O3.s %T/
7-
# RUN: cp -f %S/Inputs/amdgpu_no_merge_comments.ll %t.ll && %update_llc_test_checks --llc-binary cat %t.ll
8-
# RUN: diff -u %S/Inputs/amdgpu_no_merge_comments.ll.expected %t.ll
6+
# RUN: mkdir -p %t.dir
7+
# RUN: cp -f %S/Inputs/amdgpu_no_merge_comments-O0.s %t.dir/ && cp -f %S/Inputs/amdgpu_no_merge_comments-O3.s %t.dir/
8+
# RUN: cp -f %S/Inputs/amdgpu_no_merge_comments.ll %t.dir/file.ll && %update_llc_test_checks --llc-binary cat %t.dir/file.ll
9+
# RUN: diff -u %S/Inputs/amdgpu_no_merge_comments.ll.expected %t.dir/file.ll

llvm/test/tools/dsymutil/X86/swift-ast-x86_64.test

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
RUN: dsymutil -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %T/swift-ast.dSYM -verbose -no-swiftmodule-timestamp | FileCheck %s --check-prefix=DSYMUTIL
2-
RUN: dsymutil -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %T/swift-ast.dSYM -verbose | FileCheck %s --check-prefix=DSYMUTIL
3-
RUN: llvm-readobj --sections --section-data %T/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=READOBJ
4-
RUN: llvm-dwarfdump --show-section-sizes %T/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=DWARFDUMP
1+
RUN: rm -rf %t && mkdir %t
2+
RUN: dsymutil -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %t/swift-ast.dSYM -verbose -no-swiftmodule-timestamp | FileCheck %s --check-prefix=DSYMUTIL
3+
RUN: dsymutil -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %t/swift-ast.dSYM -verbose | FileCheck %s --check-prefix=DSYMUTIL
4+
RUN: llvm-readobj --sections --section-data %t/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=READOBJ
5+
RUN: llvm-dwarfdump --show-section-sizes %t/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=DWARFDUMP
56

6-
RUN: dsymutil --linker parallel -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %T/swift-ast.dSYM -verbose -no-swiftmodule-timestamp | FileCheck %s --check-prefix=DSYMUTIL
7-
RUN: dsymutil --linker parallel -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %T/swift-ast.dSYM -verbose | FileCheck %s --check-prefix=DSYMUTIL
8-
RUN: llvm-readobj --sections --section-data %T/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=READOBJ
9-
RUN: llvm-dwarfdump --show-section-sizes %T/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=DWARFDUMP
7+
RUN: dsymutil --linker parallel -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %t/swift-ast.dSYM -verbose -no-swiftmodule-timestamp | FileCheck %s --check-prefix=DSYMUTIL
8+
RUN: dsymutil --linker parallel -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %t/swift-ast.dSYM -verbose | FileCheck %s --check-prefix=DSYMUTIL
9+
RUN: llvm-readobj --sections --section-data %t/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=READOBJ
10+
RUN: llvm-dwarfdump --show-section-sizes %t/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=DWARFDUMP
1011

1112

1213
The tested object file has been created by the dummy Swift code:
@@ -27,5 +28,5 @@ READOBJ-NEXT: |.|
2728

2829
DWARFDUMP: __swift_ast
2930

30-
RUN: dsymutil -s %T/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=NAST
31+
RUN: dsymutil -s %t/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=NAST
3132
NAST-NOT: N_AST

0 commit comments

Comments
 (0)