Skip to content

Commit 17cf52b

Browse files
committed
[TableGen] add test for escaping dependency filenames
1 parent e742379 commit 17cf52b

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// RUN: rm -rf %t; split-file %s %t
2+
3+
//--- normal-file.td
4+
class NormalClass {}
5+
6+
//--- file with spaces.td
7+
class SpaceClass {}
8+
9+
//--- file#with#hash.td
10+
class HashClass {}
11+
12+
//--- file$with$dollar.td
13+
class DollarClass {}
14+
15+
//--- file with escape\ before spaces.td
16+
class EscapeBeforeSpacesClass {}
17+
18+
//--- main.td
19+
include "normal-file.td"
20+
include "file with spaces.td"
21+
include "file#with#hash.td"
22+
include "file$with$dollar.td"
23+
include "file with escape\\ before spaces.td" // backslash itself needs escaping
24+
25+
def Normal : NormalClass;
26+
def Spaces : SpaceClass;
27+
def Hash : HashClass;
28+
def Dollar : DollarClass;
29+
def EscapeBeforeSpaces : EscapeBeforeSpacesClass;
30+
31+
// RUN: llvm-tblgen -I %t -d %t.d -o %t.out %t/main.td
32+
// RUN: FileCheck --input-file=%t.d %s
33+
34+
// CHECK-DAG: normal-file.td
35+
// CHECK-DAG: file\ with\ spaces.td
36+
// CHECK-DAG: file\#with\#hash.td
37+
// CHECK-DAG: file$$with$$dollar.td
38+
// CHECK-DAG: file\ with\ escape\\\ before\ spaces.td

0 commit comments

Comments
 (0)