1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00
llvm-mirror/test/TableGen/paste-reserved.td
Paul C. Anagnostopoulos 0830936d52 [TableGen] Add true and false literals to represent booleans
Update the Programmer's Reference document.

Add a test. Update a couple of tests with an improved error message.

Differential Revision: https://reviews.llvm.org/D90635
2020-11-05 09:07:21 -05:00

23 lines
588 B
TableGen

// RUN: not llvm-tblgen -DERROR1 %s 2>&1 | FileCheck --check-prefix=ERROR1 %s
// RUN: not llvm-tblgen -DERROR2 %s 2>&1 | FileCheck --check-prefix=ERROR2 %s
defvar list1 = ["foo", "bar", "snork"];
// Pasting a list with a reserved word should produce an error.
#ifdef ERROR1
def list_paste {
list<string> the_list = list1 # in;
}
// ERROR1: error: Unknown or reserved token when parsing a value
#endif
// Pasting an identifier with a reserved word should produce an error.
#ifdef ERROR2
def name_paste#in {
}
// ERROR2: error: Unknown or reserved token when parsing a value
#endif