NUL in TableGen files

There are various bits of code scattered throughout the TableGen lexer to deal with NUL characters that are not at the end of the source string. I’d like to clean that up by simply disallowing NULs in .td files. Can anyone think of a legitimate reason to use a NUL in a TableGen file?

Cleaning up NUL handling in TableGen lexer sounds good.

>There are various bits of code scattered throughout the TableGen lexer
>to deal with NUL characters that are not at the end of the source
>string. I'd like to clean that up by simply disallowing NULs in .td
>files. Can anyone think of a legitimate reason to use a NUL in a
>TableGen file?

Cleaning up NUL handling in TableGen lexer sounds good.

Agreed; if there are no existing NUL characters in .td files, I think
it's okay to have the lexer assume there aren't any. They are text
files, and legitimate uses for NUL in a text file are scarce.

You could "git blame" the places that have this code, and see if the
commit history tells you anything instructive; or it might just be an
over-abundance of caution on the part of the original programmer(s).
--paulr

I just searched all the LLVM .td files and there are no NULs.