[PATCH] D36405: [AsmParser] Hash is not a comment on some targets

Oliver Stannard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 8 01:43:32 PDT 2017


olista01 added a comment.

Do you have an example of a situation where the preprocessor can emit a # mid-line, which is expected to be ignored?

According to the CPP docs [0], line-markers and other directives will always be emitted with the # as the first token on the line. The code in AsmLexer::LexToken already turns lines like this into AsmToken::HashDirective (for line-markers) or AsmToken::EndOfStatement (for any other statement starting with #, regardless of the target's comment token).

[0] https://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html


Repository:
  rL LLVM

https://reviews.llvm.org/D36405





More information about the llvm-commits mailing list