1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 22:42:46 +02:00
llvm-mirror/test/TableGen/ValidIdentifiers.td
Alp Toker cc76786c50 TableGen: Generate valid identifiers for anonymous records
Backends like OptParserEmitter assume that record names can be used as valid
identifiers.

The period '.' in generated anonymous names broke that assumption, causing a
build-time error and in practice forcing all records to be named.

llvm-svn: 197869
2013-12-21 18:51:00 +00:00

14 lines
345 B
TableGen

// Ensure that anonymous names are valid identifiers via the ctags index
// RUN: llvm-tblgen -gen-ctags %s | grep -v '^!' | not grep -viE '^[a-z_][a-z0-9_]*\t'
// Test validation
// RUN: llvm-tblgen -gen-ctags %s | grep '^anonymous' > /dev/null
// XFAIL: vg_leak
class foo<int X> { int THEVAL = X; }
def : foo<2>;
def X {
foo Y = foo<1>;
}