[llvm-dev] NUL in TableGen files

Paul C. Anagnostopoulos via llvm-dev llvm-dev at lists.llvm.org
Wed May 5 08:42:29 PDT 2021


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

On 5/5/2021 10:09 AM, paul.robinson at sony.com wrote:
>>> 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
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210505/3e2bc134/attachment.html>


More information about the llvm-dev mailing list