[PATCH] AsmParser: Require null terminator in the created memory buffer.

Matthias Braun matze at braunis.de
Wed May 20 13:27:21 PDT 2015


> Thanks for checking.  This LGTM if Matthias agrees.


I still think LLLexer should be changed in the long term to use getNextChar() consistently and a range check included in it. While technically it can be indeed faster to check for a sentinel value like '\0' in this case the check was not included in the relevant switches but was a separate check in getNextChar() anyway, so I don't think it would have had any impact; Even if we would get rid of the check I'd be surprised if you could actually measure the difference.

Anyway I can understand that we may not want to change it right now, so this patch LGTM.


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D9883

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list