[llvm] r310457 - [AsmParser] Hash is not a comment on some targets
Oliver Stannard via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 9 02:40:51 PDT 2017
Author: olista01
Date: Wed Aug 9 02:40:51 2017
New Revision: 310457
URL: http://llvm.org/viewvc/llvm-project?rev=310457&view=rev
Log:
[AsmParser] Hash is not a comment on some targets
The '#' token is not a comment for all targets (on ARM and AArch64 it marks an
immediate operand), so we shouldn't treat it as such.
Comments are already converted to AsmToken::EndOfStatement by
AsmLexer::LexLineComment, so this check was unnecessary.
Differential Revision: https://reviews.llvm.org/D36405
Modified:
llvm/trunk/lib/MC/MCParser/AsmParser.cpp
llvm/trunk/lib/MC/MCParser/MCAsmParser.cpp
llvm/trunk/test/DebugInfo/AArch64/asan-stack-vars.ll
llvm/trunk/test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_relocations.s
llvm/trunk/test/MC/ARM/directive_parsing.s
llvm/trunk/test/MC/AsmParser/AArch64/directive-parse-err.s
Modified: llvm/trunk/lib/MC/MCParser/AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/AsmParser.cpp?rev=310457&r1=310456&r2=310457&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/AsmParser.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp Wed Aug 9 02:40:51 2017
@@ -1648,16 +1648,6 @@ bool AsmParser::parseStatement(ParseStat
Lex();
return false;
}
- if (Lexer.is(AsmToken::Hash)) {
- // Seeing a hash here means that it was an end-of-line comment in
- // an asm syntax where hash's are not comment and the previous
- // statement parser did not check the end of statement. Relex as
- // EndOfStatement.
- StringRef CommentStr = parseStringToEndOfStatement();
- Lexer.Lex();
- Lexer.UnLex(AsmToken(AsmToken::EndOfStatement, CommentStr));
- return false;
- }
// Statements always start with an identifier.
AsmToken ID = getTok();
SMLoc IDLoc = ID.getLoc();
Modified: llvm/trunk/lib/MC/MCParser/MCAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/MCAsmParser.cpp?rev=310457&r1=310456&r2=310457&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/MCAsmParser.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/MCAsmParser.cpp Wed Aug 9 02:40:51 2017
@@ -40,11 +40,6 @@ bool MCAsmParser::parseTokenLoc(SMLoc &L
}
bool MCAsmParser::parseEOL(const Twine &Msg) {
- if (getTok().getKind() == AsmToken::Hash) {
- StringRef CommentStr = parseStringToEndOfStatement();
- getLexer().Lex();
- getLexer().UnLex(AsmToken(AsmToken::EndOfStatement, CommentStr));
- }
if (getTok().getKind() != AsmToken::EndOfStatement)
return Error(getTok().getLoc(), Msg);
Lex();
@@ -70,9 +65,6 @@ bool MCAsmParser::parseIntToken(int64_t
bool MCAsmParser::parseOptionalToken(AsmToken::TokenKind T) {
bool Present = (getTok().getKind() == T);
- // if token is EOL and current token is # this is an EOL comment.
- if (getTok().getKind() == AsmToken::Hash && T == AsmToken::EndOfStatement)
- Present = true;
if (Present)
parseToken(T);
return Present;
Modified: llvm/trunk/test/DebugInfo/AArch64/asan-stack-vars.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/AArch64/asan-stack-vars.ll?rev=310457&r1=310456&r2=310457&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/AArch64/asan-stack-vars.ll (original)
+++ llvm/trunk/test/DebugInfo/AArch64/asan-stack-vars.ll Wed Aug 9 02:40:51 2017
@@ -210,7 +210,7 @@ entry:
%72 = load i8*, i8** @OBJC_SELECTOR_REFERENCES_.4, align 8, !dbg !55, !invariant.load !2
%73 = bitcast %0* %65 to i8*, !dbg !55
%call2 = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* %73, i8* %72), !dbg !55
- call void asm sideeffect "mov\09fp, fp\09\09# marker for objc_retainAutoreleaseReturnValue", ""(), !dbg !55
+ call void asm sideeffect "mov\09fp, fp\09\09; marker for objc_retainAutoreleaseReturnValue", ""(), !dbg !55
%74 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call2) #3, !dbg !55
%75 = bitcast %0** %5 to i8**, !dbg !56
call void @objc_storeStrong(i8** %75, i8* null) #3, !dbg !56
Modified: llvm/trunk/test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_relocations.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_relocations.s?rev=310457&r1=310456&r2=310457&view=diff
==============================================================================
--- llvm/trunk/test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_relocations.s (original)
+++ llvm/trunk/test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_relocations.s Wed Aug 9 02:40:51 2017
@@ -33,7 +33,7 @@ l:
p:
# R_AARCH64_ADR_PREL_PG_HI21
# Test both low and high immediate values
- adrp x4, a + 20480 # 16384 + 4096
+ adrp x4, a + 20480 // 16384 + 4096
# Align next label to 16 bytes, so that LDST immediate
# fields will be non-zero
.align 4
Modified: llvm/trunk/test/MC/ARM/directive_parsing.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/directive_parsing.s?rev=310457&r1=310456&r2=310457&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/directive_parsing.s (original)
+++ llvm/trunk/test/MC/ARM/directive_parsing.s Wed Aug 9 02:40:51 2017
@@ -4,134 +4,134 @@
// CHECK: [[@LINE+1]]:10: error: unexpected token
.word 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .word 0 # EOL COMMENT
+ .word 0 @ EOL COMMENT
// CHECK: [[@LINE+1]]:11: error: unexpected token
.short 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .short 0 # EOL COMMENT
+ .short 0 @ EOL COMMENT
// CHECK: [[@LINE+1]]:11: error: unexpected token
.hword 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .hword 0 # EOL COMMENT
+ .hword 0 @ EOL COMMENT
.arch armv7-a
// CHECK: [[@LINE+1]]:9: error: unexpected token in directive
.thumb $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .thumb # EOL COMMENT
+ .thumb @ EOL COMMENT
// CHECK: [[@LINE+1]]:7: error: unexpected token in directive
.arm $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .arm # EOL COMMENT
+ .arm @ EOL COMMENT
// CHECK: [[@LINE+1]]:14: error: unexpected token in '.thumb_func' directive
.thumb_func $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .thumb_func # EOL COMMENT
+ .thumb_func @ EOL COMMENT
// CHECK: [[@LINE+1]]:11: error: unexpected token in directive
.code 16 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .code 16 # EOL COMMENTS
+ .code 16 @ EOL COMMENTS
// CHECK: [[@LINE+1]]:18: error: unexpected token in directive
.syntax unified $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .syntax unified # EOL COMMENT
+ .syntax unified @ EOL COMMENT
fred .req r5
// CHECK: [[@LINE+1]]:14: error: unexpected input in '.unreq' directive
.unreq fred $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .unreq fred # EOL COMMENTS
+ .unreq fred @ EOL COMMENTS
// CHECK: [[@LINE+1]]:18: error: unexpected token in '.fnstart' directive
.fnstart $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .fnstart # EOL COMMENT
+ .fnstart @ EOL COMMENT
// CHECK: [[@LINE+1]]:23: error: unexpected token in '.cantunwind' directive
.cantunwind $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .cantunwind # EOL COMMENT
+ .cantunwind @ EOL COMMENT
// CHECK: [[@LINE+1]]:18: error: unexpected token in '.fnend' directive
.fnend $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .fnend # EOL COMMENT
+ .fnend @ EOL COMMENT
.fnstart
// CHECK: [[@LINE+1]]:43: error: unexpected token in '.personality' directive
.personality __gxx_personality_v0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .personality __gxx_personality_v0 # EOL COMMENET
+ .personality __gxx_personality_v0 @ EOL COMMENET
// CHECK: [[@LINE+1]]:28: error: unexpected token
.setfp fp, sp, #0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .setfp fp, sp, #0 # EOL COMMENT
+ .setfp fp, sp, #0 @ EOL COMMENT
// CHECK: [[@LINE+1]]:17: error: unexpected token in '.pad' directive
.pad #0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .pad #0 # EOL COMMENT
+ .pad #0 @ EOL COMMENT
// CHECK: [[@LINE+1]]:20: error: unexpected token in directive
.save {r0} $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .save {r0} # EOL COMMENT
+ .save {r0} @ EOL COMMENT
// CHECK: [[@LINE+1]]:21: error: unexpected token in directive
.vsave {d0} $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .vsave {d0} # EOL COMMENT
+ .vsave {d0} @ EOL COMMENT
// CHECK: [[@LINE+1]]:22: error: unexpected token in '.handlerdata' directive
.handlerdata $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .handlerdata # EOL COMMENT
+ .handlerdata @ EOL COMMENT
.fnend
// CHECK: [[@LINE+1]]:9: error: unexpected token in directive
.ltorg $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .ltorg # EOL COMMENT
+ .ltorg @ EOL COMMENT
// CHECK: [[@LINE+1]]:8: error: unexpected token in directive
.pool $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .pool # EOL COMMENT
+ .pool @ EOL COMMENT
// CHECK: [[@LINE+1]]:8: error: unexpected token in directive
.even $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .even # EOL COMMENT
+ .even @ EOL COMMENT
.fnstart
// CHECK: [[@LINE+1]]:22: error: unexpected token in '.personalityindex' directive
.personalityindex 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .personalityindex 0 # EOL COMMENT
+ .personalityindex 0 @ EOL COMMENT
.fnend
.fnstart
// CHECK: [[@LINE+1]]:19: error: unexpected token
.unwind_raw 0, 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .unwind_raw 0, 0 # EOL COMMENT
+ .unwind_raw 0, 0 @ EOL COMMENT
// CHECK: [[@LINE+1]]:12: error: unexpected token in '.movsp' directive
.movsp r0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .movsp r1 # EOL COMMENT
+ .movsp r1 @ EOL COMMENT
.fnend
// CHECK: [[@LINE+1]]:21: error: unexpected token in '.arch_extension' directive
.arch_extension mp $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .arch_extension mp # EOL COMMENT
+ .arch_extension mp @ EOL COMMENT
// CHECK: [[@LINE+1]]:21: error: unexpected token in '.arch_extension' directive
.arch_extension mp $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .arch_extension mp # EOL COMMENT
+ .arch_extension mp @ EOL COMMENT
.type arm_func,%function
arm_func:
@@ -139,32 +139,32 @@ arm_func:
// CHECK: [[@LINE+1]]:45: error: unexpected token
.thumb_set alias_arm_func, arm_func $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .thumb_set alias_arm_func, arm_func # EOL COMMENT
+ .thumb_set alias_arm_func, arm_func @ EOL COMMENT
// CHECK: [[@LINE+1]]:23: error: unexpected token in '.eabi_attribute' directive
.eabi_attribute 0, 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .eabi_attribute 0, 0 # EOL COMMENT
+ .eabi_attribute 0, 0 @ EOL COMMENT
.arm
// CHECK: [[@LINE+1]]:10: error: unexpected token
.inst 2 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .inst 2 # EOL COMMENT
+ .inst 2 @ EOL COMMENT
.thumb
// CHECK: [[@LINE+1]]:12: error: unexpected token
.inst.n 2 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .inst.n 2 # EOL COMMENT
+ .inst.n 2 @ EOL COMMENT
// CHECK: [[@LINE+1]]:12: error: unexpected token
.inst.w 4 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .inst.w 4 # EOL COMMENT
+ .inst.w 4 @ EOL COMMENT
// CHECK: [[@LINE+1]]:21: error: unexpected token
.object_arch armv7 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .object_arch armv7 # EOL COMMENT
+ .object_arch armv7 @ EOL COMMENT
// CHECK: [[@LINE+1]]:23: error: unexpected token in '.tlsdescseq' directive
.tlsdescseq variable $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .tlsdescseq variable # EOL COMMENT
+ .tlsdescseq variable @ EOL COMMENT
Modified: llvm/trunk/test/MC/AsmParser/AArch64/directive-parse-err.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/AArch64/directive-parse-err.s?rev=310457&r1=310456&r2=310457&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/AArch64/directive-parse-err.s (original)
+++ llvm/trunk/test/MC/AsmParser/AArch64/directive-parse-err.s Wed Aug 9 02:40:51 2017
@@ -1,257 +1,257 @@
-// RUN: not llvm-mc -triple aarch64-unknown-unknown %s 2>&1 | FileCheck %s
-// RUN: not llvm-mc -triple aarch64-unknown-unknown %s 2>&1 | grep "error:" | count 60
+// RUN: not llvm-mc -triple aarch64-none-eabi %s 2>&1 | FileCheck %s
+// RUN: not llvm-mc -triple aarch64-none-eabi %s 2>&1 | grep "error:" | count 60
// CHECK: [[@LINE+1]]:19: error: unexpected token in '.equ' directive
.equ ident1, 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .equ ident1, 0 # EOL COMMENT
+ .equ ident1, 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:19: error: unexpected token in '.equiv' directive
.equiv ident2, 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .equiv ident2, 0 # EOL COMMENT
+ .equiv ident2, 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:19: error: unexpected token in '.set' directive
.set ident3, 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .set ident3, 0 # EOL COMMENT
+ .set ident3, 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:20: error: unexpected token in '.ascii' directive
.ascii "string1" $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .ascii "string1" # EOL COMMENT
+ .ascii "string1" // EOL COMMENT
// CHECK: [[@LINE+1]]:20: error: unexpected token in '.asciz' directive
.asciz "string2" $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .asciz "string2" # EOL COMMENT
+ .asciz "string2" // EOL COMMENT
// CHECK: [[@LINE+1]]:20: error: unexpected token in '.string' directive
.string "string3" $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .string "string3" # EOL COMMENT
+ .string "string3" // EOL COMMENT
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.byte' directive
.byte 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .byte 0 # EOL COMMENT
+ .byte 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.dc.b' directive
.dc.b 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .dc.b 0 # EOL COMMENT
+ .dc.b 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:8: error: unexpected token in '.dc' directive
.dc 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .dc.b 0 # EOL COMMENT
+ .dc.b 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.dc.w' directive
.dc.w 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .dc.w 0 # EOL COMMENT
+ .dc.w 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:11: error: unexpected token in '.short' directive
.short 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .short 0 # EOL COMMENT
+ .short 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:11: error: unexpected token in '.value' directive
.value 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .value 0 # EOL COMMENT
+ .value 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:11: error: unexpected token in '.2byte' directive
.2byte 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .2byte 0 # EOL COMMENT
+ .2byte 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.long' directive
.long 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .long 0 # EOL COMMENT
+ .long 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.int' directive
.int 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .int 0 # EOL COMMENT
+ .int 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:11: error: unexpected token in '.4byte' directive
.4byte 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .4byte 0 # EOL COMMENT
+ .4byte 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.dc.l' directive
.dc.l 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .dc.l 0 # EOL COMMENT
+ .dc.l 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.quad' directive
.quad 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .quad 0 # EOL COMMENT
+ .quad 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:11: error: unexpected token in '.8byte' directive
.8byte 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .8byte 0 # EOL COMMENT
+ .8byte 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.dc.a' directive
.dc.a 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .dc.a 0 # EOL COMMENT
+ .dc.a 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.octa' directive
.octa 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .octa 0 # EOL COMMENT
+ .octa 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:12: error: unexpected token in '.single' directive
.single 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .single 0 # EOL COMMENT
+ .single 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:11: error: unexpected token in '.float' directive
.float 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .float 0 # EOL COMMENT
+ .float 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.dc.s' directive
.dc.s 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .dc.s 0 # EOL COMMENT
+ .dc.s 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:12: error: unexpected token in '.double' directive
.double 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .double 0 # EOL COMMENT
+ .double 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.dc.d' directive
.dc.d 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .dc.d 0 # EOL COMMENT
+ .dc.d 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:13: error: unexpected token in '.fill' directive
.fill 1, 1 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .fill 1, 1 # EOL COMMENT
+ .fill 1, 1 // EOL COMMENT
// CHECK: [[@LINE+1]]:17: error: unexpected token in '.fill' directive
.fill 1, 1, 10 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .fill 1, 1, 10 # EOL COMMENT
+ .fill 1, 1, 10 // EOL COMMENT
// CHECK: [[@LINE+1]]:16: error: unexpected token in '.org' directive
.org 1 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .org 1 # EOL COMMENT
+ .org 1 // EOL COMMENT
// CHECK: [[@LINE+1]]:11: error: unexpected token in directive
.align 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .align 0 # EOL COMMENT
+ .align 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:13: error: unexpected token in directive
.align32 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .align32 0 # EOL COMMENT
+ .align32 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:12: error: unexpected token in directive
.balign 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .balign 0 # EOL COMMENT
+ .balign 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:13: error: unexpected token in directive
.balignw 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .balignw 0 # EOL COMMENT
+ .balignw 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:13: error: unexpected token in directive
.balignl 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .balignl 0 # EOL COMMENT
+ .balignl 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:13: error: unexpected token in directive
.p2align 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .p2align 0 # EOL COMMENT
+ .p2align 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:14: error: unexpected token in directive
.p2alignw 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .p2alignw 0 # EOL COMMENT
+ .p2alignw 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:14: error: unexpected token in directive
.p2alignl 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .p2alignl 0 # EOL COMMENT
+ .p2alignl 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:8: error: unexpected token in '.line' directive
.line $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .line # EOL COMMENT
+ .line // EOL COMMENT
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.line' directive
.line 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .line 0 # EOL COMMENT
+ .line 0 // EOL COMMENT
.file 1 "hello"
// CHECK: [[@LINE+1]]:16: error: unexpected token in '.loc' directive
.loc 1 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .loc 1 # EOL COMMENT
+ .loc 1 // EOL COMMENT
// CHECK: [[@LINE+1]]:21: error: unexpected token in '.cv_file' directive
.cv_file 1 "hello" $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .cv_file 1 "hello" # EOL COMMENT
+ .cv_file 1 "hello" // EOL COMMENT
.cv_func_id 1
// CHECK: [[@LINE+1]]:14: error: unexpected token in '.cv_loc' directive
.cv_loc 1 1 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .cv_loc 1 1 # EOL COMMENT
+ .cv_loc 1 1 // EOL COMMENT
// CHECK: [[@LINE+1]]:28: error: unexpected token after '.bundle_lock' directive option
.bundle_lock align_to_end $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .bundle_lock align_to_end # EOL COMMENT
+ .bundle_lock align_to_end // EOL COMMENT
// CHECK: [[@LINE+1]]:11: error: invalid token in expression in directive
.sleb128 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .sleb128 # EOL COMMENT
+ .sleb128 // EOL COMMENT
// CHECK: [[@LINE+1]]:13: error: unexpected token in directive
.sleb128 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .sleb128 0 # EOL COMMENT
+ .sleb128 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:11: error: invalid token in expression in directive
.uleb128 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .uleb128 # EOL COMMENT
+ .uleb128 // EOL COMMENT
// CHECK: [[@LINE+1]]:13: error: unexpected token in directive
.uleb128 0 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .uleb128 0 # EOL COMMENT
+ .uleb128 0 // EOL COMMENT
// CHECK: [[@LINE+1]]:31: error: unexpected token
.globl a1 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .globl a1 # EOL COMMENT
+ .globl a1 // EOL COMMENT
// CHECK: [[@LINE+1]]:31: error: unexpected token in directive
.global a2 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .global a2 # EOL COMMENT
+ .global a2 // EOL COMMENT
// CHECK: [[@LINE+1]]:31: error: unexpected token in directive
.lazy_reference a3 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .lazy_reference a3 # EOL COMMENT
+ .lazy_reference a3 // EOL COMMENT
// CHECK: [[@LINE+1]]:31: error: unexpected token in directive
.symbol_resolver a4 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .symbol_resolver a4 # EOL COMMENT
+ .symbol_resolver a4 // EOL COMMENT
// CHECK: [[@LINE+1]]:31: error: unexpected token in directive
.private_extern a5 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .private_extern a5 # EOL COMMENT
+ .private_extern a5 // EOL COMMENT
// CHECK: [[@LINE+1]]:31: error: unexpected token in directive
.reference a6 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .reference a6 # EOL COMMENT
+ .reference a6 // EOL COMMENT
// CHECK: [[@LINE+1]]:31: error: unexpected token in directive
.weak_definition a7 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .weak_definition a7 # EOL COMMENT
+ .weak_definition a7 // EOL COMMENT
// CHECK: [[@LINE+1]]:31: error: unexpected token in directive
.weak_reference a8 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .weak_reference a8 # EOL COMMENT
+ .weak_reference a8 // EOL COMMENT
// CHECK: [[@LINE+1]]:31: error: unexpected token in directive
.weak_def_can_be_hidden a9 $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .weak_def_can_be_hidden a9 # EOL COMMENT
+ .weak_def_can_be_hidden a9 // EOL COMMENT
// CHECK: [[@LINE+1]]:12: error: .warning argument must be a string
.warning $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .warning # EOL COMMENT
+ .warning // EOL COMMENT
// CHECK: [[@LINE+1]]:21: error: expected end of statement in '.warning' directive
.warning "warning" $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .warning "warning" # EOL COMMENT
+ .warning "warning" // EOL COMMENT
// CHECK: [[@LINE+1]]:17: error: unexpected token in '.cfi_startproc' directive
.cfi_startproc $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .cfi_startproc # EOL COMMENT
+ .cfi_startproc // EOL COMMENT
.cfi_endproc
// CHECK: [[@LINE+1]]:24: error: unexpected token in '.cfi_startproc' directive
.cfi_startproc simple $
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
- .cfi_startproc simple # EOL COMMENT
+ .cfi_startproc simple // EOL COMMENT
.cfi_endproc
More information about the llvm-commits
mailing list