1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/test/MC/ARM/preserve-comments-arm.s
Nirav Dave a989955d61 Fix handling of end-of-line preprocessor comments Attempt 2
Attempt 2: Retryign after Tsan.mman test fix.

Attempt 1: Recommitting after fixing test.

When parsing assembly where the line comment syntax is not hash, the
lexer cannot distinguish between hash's that start a hash line comment
and one that is part of an assembly statement and must be distinguished
during parsing. Previously, this was incompletely handled by not checking
for EndOfStatement at the end of statements and interpreting hash
prefixed statements as comments.

Change EndOfStatement Parsing to check for Hash comments and reintroduce
Hash statement parsing to catch previously handled cases.

Reviewers: rnk, majnemer

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D23017

llvm-svn: 277501
2016-08-02 19:17:54 +00:00

11 lines
206 B
ArmAsm

@RUN: llvm-mc -preserve-comments -n -triple arm-eabi < %s > %t
@RUN: sed 's/#[C]omment/@Comment/g' %s > %t2
@RUN: diff %t %t2
.text
mov r0, r0
foo: #Comment here
mov r0, r0 @ EOL comment
.ident ""