[llvm] [MC,ELF] Emit warning if a string constant contains newline char. (PR #98060)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 23:25:16 PDT 2024


https://github.com/s-barannikov requested changes to this pull request.

1. Printing text to stdout is not the correct way to report warnings, it should be done via source manager (and it is likely there are helper functions).
2. AsmLexer is a lexer, not parser. It does not know the context the lexed string is used. In some contexts the warning may not be desired. The warning, if needed, should be emitted by a parser that knows full context, e.g. in `AsmParser::parseDirectiveAscii`.


https://github.com/llvm/llvm-project/pull/98060


More information about the llvm-commits mailing list