Fixes issue: https://bugs.llvm.org/show_bug.cgi?id=47983
The AsmLexer has a function LexLineComment that, as part of the lexing, passes the contents of the comment to a CommentConsumer if one exists. The passed comment is meant to exclude newline characters, but it does this by taking the range from the start of the comment inclusive to the last newline exclusive; this works with Unix line-endings, which are a single character, but fails when used with Windows line-endings, in which case the carriage return will be included as part of the passed comment. This causes an issue with llvm-mca, as it reads directives which have no label as directives with the label \r, but may result in inconsistent behaviour for any consumer when switching between line ending styles.