llvm.org GIT mirror llvm / a65cb63
Revert "[AsmParser] Hash is not a comment on some targets" This reverts commit r310457. It causes clang-produced IR to fail llvm codegen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310662 91177308-0d34-0410-b5e6-96231b3b80d8 Ahmed Bougacha 2 years ago
6 changed file(s) with 115 addition(s) and 97 deletion(s). Raw diff Collapse all Expand all
16451645 getTok().getString().front() == '\n')
16461646 Out.AddBlankLine();
16471647 Lex();
1648 return false;
1649 }
1650 if (Lexer.is(AsmToken::Hash)) {
1651 // Seeing a hash here means that it was an end-of-line comment in
1652 // an asm syntax where hash's are not comment and the previous
1653 // statement parser did not check the end of statement. Relex as
1654 // EndOfStatement.
1655 StringRef CommentStr = parseStringToEndOfStatement();
1656 Lexer.Lex();
1657 Lexer.UnLex(AsmToken(AsmToken::EndOfStatement, CommentStr));
16481658 return false;
16491659 }
16501660 // Statements always start with an identifier.
3939 }
4040
4141 bool MCAsmParser::parseEOL(const Twine &Msg) {
42 if (getTok().getKind() == AsmToken::Hash) {
43 StringRef CommentStr = parseStringToEndOfStatement();
44 getLexer().Lex();
45 getLexer().UnLex(AsmToken(AsmToken::EndOfStatement, CommentStr));
46 }
4247 if (getTok().getKind() != AsmToken::EndOfStatement)
4348 return Error(getTok().getLoc(), Msg);
4449 Lex();
6469
6570 bool MCAsmParser::parseOptionalToken(AsmToken::TokenKind T) {
6671 bool Present = (getTok().getKind() == T);
72 // if token is EOL and current token is # this is an EOL comment.
73 if (getTok().getKind() == AsmToken::Hash && T == AsmToken::EndOfStatement)
74 Present = true;
6775 if (Present)
6876 parseToken(T);
6977 return Present;
209209 %72 = load i8*, i8** @OBJC_SELECTOR_REFERENCES_.4, align 8, !dbg !55, !invariant.load !2
210210 %73 = bitcast %0* %65 to i8*, !dbg !55
211211 %call2 = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* %73, i8* %72), !dbg !55
212 call void asm sideeffect "mov\09fp, fp\09\09; marker for objc_retainAutoreleaseReturnValue", ""(), !dbg !55
212 call void asm sideeffect "mov\09fp, fp\09\09# marker for objc_retainAutoreleaseReturnValue", ""(), !dbg !55
213213 %74 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call2) #3, !dbg !55
214214 %75 = bitcast %0** %5 to i8**, !dbg !56
215215 call void @objc_storeStrong(i8** %75, i8* null) #3, !dbg !56
3232 p:
3333 # R_AARCH64_ADR_PREL_PG_HI21
3434 # Test both low and high immediate values
35 adrp x4, a + 20480 // 16384 + 4096
35 adrp x4, a + 20480 # 16384 + 4096
3636 # Align next label to 16 bytes, so that LDST immediate
3737 # fields will be non-zero
3838 .align 4
33 // CHECK: [[@LINE+1]]:10: error: unexpected token
44 .word 0 $
55 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
6 .word 0 @ EOL COMMENT
6 .word 0 # EOL COMMENT
77 // CHECK: [[@LINE+1]]:11: error: unexpected token
88 .short 0 $
99 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
10 .short 0 @ EOL COMMENT
10 .short 0 # EOL COMMENT
1111 // CHECK: [[@LINE+1]]:11: error: unexpected token
1212 .hword 0 $
1313 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
14 .hword 0 @ EOL COMMENT
14 .hword 0 # EOL COMMENT
1515
1616 .arch armv7-a
1717 // CHECK: [[@LINE+1]]:9: error: unexpected token in directive
1818 .thumb $
1919 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
20 .thumb @ EOL COMMENT
20 .thumb # EOL COMMENT
2121
2222 // CHECK: [[@LINE+1]]:7: error: unexpected token in directive
2323 .arm $
2424 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
25 .arm @ EOL COMMENT
25 .arm # EOL COMMENT
2626 // CHECK: [[@LINE+1]]:14: error: unexpected token in '.thumb_func' directive
2727 .thumb_func $
2828 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
29 .thumb_func @ EOL COMMENT
29 .thumb_func # EOL COMMENT
3030 // CHECK: [[@LINE+1]]:11: error: unexpected token in directive
3131 .code 16 $
3232 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
33 .code 16 @ EOL COMMENTS
33 .code 16 # EOL COMMENTS
3434 // CHECK: [[@LINE+1]]:18: error: unexpected token in directive
3535 .syntax unified $
3636 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
37 .syntax unified @ EOL COMMENT
37 .syntax unified # EOL COMMENT
3838 fred .req r5
3939 // CHECK: [[@LINE+1]]:14: error: unexpected input in '.unreq' directive
4040 .unreq fred $
4141 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
42 .unreq fred @ EOL COMMENTS
42 .unreq fred # EOL COMMENTS
4343
4444 // CHECK: [[@LINE+1]]:18: error: unexpected token in '.fnstart' directive
4545 .fnstart $
4646 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
47 .fnstart @ EOL COMMENT
47 .fnstart # EOL COMMENT
4848 // CHECK: [[@LINE+1]]:23: error: unexpected token in '.cantunwind' directive
4949 .cantunwind $
5050 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
51 .cantunwind @ EOL COMMENT
51 .cantunwind # EOL COMMENT
5252
5353
5454 // CHECK: [[@LINE+1]]:18: error: unexpected token in '.fnend' directive
5555 .fnend $
5656 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
57 .fnend @ EOL COMMENT
57 .fnend # EOL COMMENT
5858
5959 .fnstart
6060 // CHECK: [[@LINE+1]]:43: error: unexpected token in '.personality' directive
6161 .personality __gxx_personality_v0 $
6262 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
63 .personality __gxx_personality_v0 @ EOL COMMENET
63 .personality __gxx_personality_v0 # EOL COMMENET
6464
6565 // CHECK: [[@LINE+1]]:28: error: unexpected token
6666 .setfp fp, sp, #0 $
6767 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
68 .setfp fp, sp, #0 @ EOL COMMENT
68 .setfp fp, sp, #0 # EOL COMMENT
6969
7070
7171 // CHECK: [[@LINE+1]]:17: error: unexpected token in '.pad' directive
7272 .pad #0 $
7373 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
74 .pad #0 @ EOL COMMENT
74 .pad #0 # EOL COMMENT
7575
7676 // CHECK: [[@LINE+1]]:20: error: unexpected token in directive
7777 .save {r0} $
7878 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
79 .save {r0} @ EOL COMMENT
79 .save {r0} # EOL COMMENT
8080
8181 // CHECK: [[@LINE+1]]:21: error: unexpected token in directive
8282 .vsave {d0} $
8383 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
84 .vsave {d0} @ EOL COMMENT
84 .vsave {d0} # EOL COMMENT
8585
8686
8787 // CHECK: [[@LINE+1]]:22: error: unexpected token in '.handlerdata' directive
8888 .handlerdata $
8989 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
90 .handlerdata @ EOL COMMENT
90 .handlerdata # EOL COMMENT
9191
9292 .fnend
9393
9494 // CHECK: [[@LINE+1]]:9: error: unexpected token in directive
9595 .ltorg $
9696 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
97 .ltorg @ EOL COMMENT
97 .ltorg # EOL COMMENT
9898 // CHECK: [[@LINE+1]]:8: error: unexpected token in directive
9999 .pool $
100100 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
101 .pool @ EOL COMMENT
101 .pool # EOL COMMENT
102102 // CHECK: [[@LINE+1]]:8: error: unexpected token in directive
103103 .even $
104104 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
105 .even @ EOL COMMENT
105 .even # EOL COMMENT
106106 .fnstart
107107 // CHECK: [[@LINE+1]]:22: error: unexpected token in '.personalityindex' directive
108108 .personalityindex 0 $
109109 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
110 .personalityindex 0 @ EOL COMMENT
110 .personalityindex 0 # EOL COMMENT
111111 .fnend
112112
113113 .fnstart
114114 // CHECK: [[@LINE+1]]:19: error: unexpected token
115115 .unwind_raw 0, 0 $
116116 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
117 .unwind_raw 0, 0 @ EOL COMMENT
117 .unwind_raw 0, 0 # EOL COMMENT
118118
119119 // CHECK: [[@LINE+1]]:12: error: unexpected token in '.movsp' directive
120120 .movsp r0 $
121121 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
122 .movsp r1 @ EOL COMMENT
122 .movsp r1 # EOL COMMENT
123123 .fnend
124124
125125 // CHECK: [[@LINE+1]]:21: error: unexpected token in '.arch_extension' directive
126126 .arch_extension mp $
127127 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
128 .arch_extension mp @ EOL COMMENT
128 .arch_extension mp # EOL COMMENT
129129
130130 // CHECK: [[@LINE+1]]:21: error: unexpected token in '.arch_extension' directive
131131 .arch_extension mp $
132132 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
133 .arch_extension mp @ EOL COMMENT
133 .arch_extension mp # EOL COMMENT
134134
135135 .type arm_func,%function
136136 arm_func:
138138 // CHECK: [[@LINE+1]]:45: error: unexpected token
139139 .thumb_set alias_arm_func, arm_func $
140140 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
141 .thumb_set alias_arm_func, arm_func @ EOL COMMENT
141 .thumb_set alias_arm_func, arm_func # EOL COMMENT
142142
143143 // CHECK: [[@LINE+1]]:23: error: unexpected token in '.eabi_attribute' directive
144144 .eabi_attribute 0, 0 $
145145 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
146 .eabi_attribute 0, 0 @ EOL COMMENT
146 .eabi_attribute 0, 0 # EOL COMMENT
147147
148148 .arm
149149 // CHECK: [[@LINE+1]]:10: error: unexpected token
150150 .inst 2 $
151151 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
152 .inst 2 @ EOL COMMENT
152 .inst 2 # EOL COMMENT
153153 .thumb
154154 // CHECK: [[@LINE+1]]:12: error: unexpected token
155155 .inst.n 2 $
156156 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
157 .inst.n 2 @ EOL COMMENT
157 .inst.n 2 # EOL COMMENT
158158 // CHECK: [[@LINE+1]]:12: error: unexpected token
159159 .inst.w 4 $
160160 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
161 .inst.w 4 @ EOL COMMENT
161 .inst.w 4 # EOL COMMENT
162162 // CHECK: [[@LINE+1]]:21: error: unexpected token
163163 .object_arch armv7 $
164164 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
165 .object_arch armv7 @ EOL COMMENT
165 .object_arch armv7 # EOL COMMENT
166166 // CHECK: [[@LINE+1]]:23: error: unexpected token in '.tlsdescseq' directive
167167 .tlsdescseq variable $
168168 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
169 .tlsdescseq variable @ EOL COMMENT
169 .tlsdescseq variable # EOL COMMENT
None // RUN: not llvm-mc -triple aarch64-none-eabi %s 2>&1 | FileCheck %s
1 // RUN: not llvm-mc -triple aarch64-none-eabi %s 2>&1 | grep "error:" | count 60
0 // RUN: not llvm-mc -triple aarch64-unknown-unknown %s 2>&1 | FileCheck %s
1 // RUN: not llvm-mc -triple aarch64-unknown-unknown %s 2>&1 | grep "error:" | count 60
22
33 // CHECK: [[@LINE+1]]:19: error: unexpected token in '.equ' directive
44 .equ ident1, 0 $
55 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
6 .equ ident1, 0 // EOL COMMENT
6 .equ ident1, 0 # EOL COMMENT
77 // CHECK: [[@LINE+1]]:19: error: unexpected token in '.equiv' directive
88 .equiv ident2, 0 $
99 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
10 .equiv ident2, 0 // EOL COMMENT
10 .equiv ident2, 0 # EOL COMMENT
1111 // CHECK: [[@LINE+1]]:19: error: unexpected token in '.set' directive
1212 .set ident3, 0 $
1313 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
14 .set ident3, 0 // EOL COMMENT
14 .set ident3, 0 # EOL COMMENT
1515 // CHECK: [[@LINE+1]]:20: error: unexpected token in '.ascii' directive
1616 .ascii "string1" $
1717 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
18 .ascii "string1" // EOL COMMENT
18 .ascii "string1" # EOL COMMENT
1919 // CHECK: [[@LINE+1]]:20: error: unexpected token in '.asciz' directive
2020 .asciz "string2" $
2121 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
22 .asciz "string2" // EOL COMMENT
22 .asciz "string2" # EOL COMMENT
2323 // CHECK: [[@LINE+1]]:20: error: unexpected token in '.string' directive
2424 .string "string3" $
2525 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
26 .string "string3" // EOL COMMENT
26 .string "string3" # EOL COMMENT
2727 // CHECK: [[@LINE+1]]:10: error: unexpected token in '.byte' directive
2828 .byte 0 $
2929 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
30 .byte 0 // EOL COMMENT
30 .byte 0 # EOL COMMENT
3131 // CHECK: [[@LINE+1]]:10: error: unexpected token in '.dc.b' directive
3232 .dc.b 0 $
3333 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
34 .dc.b 0 // EOL COMMENT
34 .dc.b 0 # EOL COMMENT
3535 // CHECK: [[@LINE+1]]:8: error: unexpected token in '.dc' directive
3636 .dc 0 $
3737 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
38 .dc.b 0 // EOL COMMENT
38 .dc.b 0 # EOL COMMENT
3939 // CHECK: [[@LINE+1]]:10: error: unexpected token in '.dc.w' directive
4040 .dc.w 0 $
4141 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
42 .dc.w 0 // EOL COMMENT
42 .dc.w 0 # EOL COMMENT
4343 // CHECK: [[@LINE+1]]:11: error: unexpected token in '.short' directive
4444 .short 0 $
4545 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
46 .short 0 // EOL COMMENT
46 .short 0 # EOL COMMENT
4747 // CHECK: [[@LINE+1]]:11: error: unexpected token in '.value' directive
4848 .value 0 $
4949 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
50 .value 0 // EOL COMMENT
50 .value 0 # EOL COMMENT
5151 // CHECK: [[@LINE+1]]:11: error: unexpected token in '.2byte' directive
5252 .2byte 0 $
5353 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
54 .2byte 0 // EOL COMMENT
54 .2byte 0 # EOL COMMENT
5555 // CHECK: [[@LINE+1]]:10: error: unexpected token in '.long' directive
5656 .long 0 $
5757 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
58 .long 0 // EOL COMMENT
58 .long 0 # EOL COMMENT
5959 // CHECK: [[@LINE+1]]:10: error: unexpected token in '.int' directive
6060 .int 0 $
6161 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
62 .int 0 // EOL COMMENT
62 .int 0 # EOL COMMENT
6363 // CHECK: [[@LINE+1]]:11: error: unexpected token in '.4byte' directive
6464 .4byte 0 $
6565 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
66 .4byte 0 // EOL COMMENT
66 .4byte 0 # EOL COMMENT
6767 // CHECK: [[@LINE+1]]:10: error: unexpected token in '.dc.l' directive
6868 .dc.l 0 $
6969 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
70 .dc.l 0 // EOL COMMENT
70 .dc.l 0 # EOL COMMENT
7171 // CHECK: [[@LINE+1]]:10: error: unexpected token in '.quad' directive
7272 .quad 0 $
7373 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
74 .quad 0 // EOL COMMENT
74 .quad 0 # EOL COMMENT
7575 // CHECK: [[@LINE+1]]:11: error: unexpected token in '.8byte' directive
7676 .8byte 0 $
7777 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
78 .8byte 0 // EOL COMMENT
78 .8byte 0 # EOL COMMENT
7979 // CHECK: [[@LINE+1]]:10: error: unexpected token in '.dc.a' directive
8080 .dc.a 0 $
8181 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
82 .dc.a 0 // EOL COMMENT
82 .dc.a 0 # EOL COMMENT
8383 // CHECK: [[@LINE+1]]:10: error: unexpected token in '.octa' directive
8484 .octa 0 $
8585 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
86 .octa 0 // EOL COMMENT
86 .octa 0 # EOL COMMENT
8787 // CHECK: [[@LINE+1]]:12: error: unexpected token in '.single' directive
8888 .single 0 $
8989 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
90 .single 0 // EOL COMMENT
90 .single 0 # EOL COMMENT
9191 // CHECK: [[@LINE+1]]:11: error: unexpected token in '.float' directive
9292 .float 0 $
9393 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
94 .float 0 // EOL COMMENT
94 .float 0 # EOL COMMENT
9595 // CHECK: [[@LINE+1]]:10: error: unexpected token in '.dc.s' directive
9696 .dc.s 0 $
9797 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
98 .dc.s 0 // EOL COMMENT
98 .dc.s 0 # EOL COMMENT
9999 // CHECK: [[@LINE+1]]:12: error: unexpected token in '.double' directive
100100 .double 0 $
101101 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
102 .double 0 // EOL COMMENT
102 .double 0 # EOL COMMENT
103103 // CHECK: [[@LINE+1]]:10: error: unexpected token in '.dc.d' directive
104104 .dc.d 0 $
105105 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
106 .dc.d 0 // EOL COMMENT
106 .dc.d 0 # EOL COMMENT
107107 // CHECK: [[@LINE+1]]:13: error: unexpected token in '.fill' directive
108108 .fill 1, 1 $
109109 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
110 .fill 1, 1 // EOL COMMENT
110 .fill 1, 1 # EOL COMMENT
111111 // CHECK: [[@LINE+1]]:17: error: unexpected token in '.fill' directive
112112 .fill 1, 1, 10 $
113113 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
114 .fill 1, 1, 10 // EOL COMMENT
114 .fill 1, 1, 10 # EOL COMMENT
115115 // CHECK: [[@LINE+1]]:16: error: unexpected token in '.org' directive
116116 .org 1 $
117117 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
118 .org 1 // EOL COMMENT
118 .org 1 # EOL COMMENT
119119 // CHECK: [[@LINE+1]]:11: error: unexpected token in directive
120120 .align 0 $
121121 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
122 .align 0 // EOL COMMENT
122 .align 0 # EOL COMMENT
123123 // CHECK: [[@LINE+1]]:13: error: unexpected token in directive
124124 .align32 0 $
125125 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
126 .align32 0 // EOL COMMENT
126 .align32 0 # EOL COMMENT
127127 // CHECK: [[@LINE+1]]:12: error: unexpected token in directive
128128 .balign 0 $
129129 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
130 .balign 0 // EOL COMMENT
130 .balign 0 # EOL COMMENT
131131 // CHECK: [[@LINE+1]]:13: error: unexpected token in directive
132132 .balignw 0 $
133133 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
134 .balignw 0 // EOL COMMENT
134 .balignw 0 # EOL COMMENT
135135 // CHECK: [[@LINE+1]]:13: error: unexpected token in directive
136136 .balignl 0 $
137137 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
138 .balignl 0 // EOL COMMENT
138 .balignl 0 # EOL COMMENT
139139 // CHECK: [[@LINE+1]]:13: error: unexpected token in directive
140140 .p2align 0 $
141141 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
142 .p2align 0 // EOL COMMENT
142 .p2align 0 # EOL COMMENT
143143 // CHECK: [[@LINE+1]]:14: error: unexpected token in directive
144144 .p2alignw 0 $
145145 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
146 .p2alignw 0 // EOL COMMENT
146 .p2alignw 0 # EOL COMMENT
147147 // CHECK: [[@LINE+1]]:14: error: unexpected token in directive
148148 .p2alignl 0 $
149149 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
150 .p2alignl 0 // EOL COMMENT
150 .p2alignl 0 # EOL COMMENT
151151 // CHECK: [[@LINE+1]]:8: error: unexpected token in '.line' directive
152152 .line $
153153 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
154 .line // EOL COMMENT
154 .line # EOL COMMENT
155155 // CHECK: [[@LINE+1]]:10: error: unexpected token in '.line' directive
156156 .line 0 $
157157 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
158 .line 0 // EOL COMMENT
158 .line 0 # EOL COMMENT
159159
160160 .file 1 "hello"
161161 // CHECK: [[@LINE+1]]:16: error: unexpected token in '.loc' directive
162162 .loc 1 $
163163 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
164 .loc 1 // EOL COMMENT
164 .loc 1 # EOL COMMENT
165165
166166 // CHECK: [[@LINE+1]]:21: error: unexpected token in '.cv_file' directive
167167 .cv_file 1 "hello" $
168168 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
169 .cv_file 1 "hello" // EOL COMMENT
169 .cv_file 1 "hello" # EOL COMMENT
170170
171171 .cv_func_id 1
172172 // CHECK: [[@LINE+1]]:14: error: unexpected token in '.cv_loc' directive
173173 .cv_loc 1 1 $
174174 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
175 .cv_loc 1 1 // EOL COMMENT
175 .cv_loc 1 1 # EOL COMMENT
176176
177177 // CHECK: [[@LINE+1]]:28: error: unexpected token after '.bundle_lock' directive option
178178 .bundle_lock align_to_end $
179179 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
180 .bundle_lock align_to_end // EOL COMMENT
180 .bundle_lock align_to_end # EOL COMMENT
181181
182182 // CHECK: [[@LINE+1]]:11: error: invalid token in expression in directive
183183 .sleb128 $
184184 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
185 .sleb128 // EOL COMMENT
185 .sleb128 # EOL COMMENT
186186 // CHECK: [[@LINE+1]]:13: error: unexpected token in directive
187187 .sleb128 0 $
188188 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
189 .sleb128 0 // EOL COMMENT
189 .sleb128 0 # EOL COMMENT
190190
191191 // CHECK: [[@LINE+1]]:11: error: invalid token in expression in directive
192192 .uleb128 $
193193 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
194 .uleb128 // EOL COMMENT
194 .uleb128 # EOL COMMENT
195195 // CHECK: [[@LINE+1]]:13: error: unexpected token in directive
196196 .uleb128 0 $
197197 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
198 .uleb128 0 // EOL COMMENT
198 .uleb128 0 # EOL COMMENT
199199 // CHECK: [[@LINE+1]]:31: error: unexpected token
200200 .globl a1 $
201201 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
202 .globl a1 // EOL COMMENT
202 .globl a1 # EOL COMMENT
203203 // CHECK: [[@LINE+1]]:31: error: unexpected token in directive
204204 .global a2 $
205205 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
206 .global a2 // EOL COMMENT
206 .global a2 # EOL COMMENT
207207 // CHECK: [[@LINE+1]]:31: error: unexpected token in directive
208208 .lazy_reference a3 $
209209 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
210 .lazy_reference a3 // EOL COMMENT
210 .lazy_reference a3 # EOL COMMENT
211211 // CHECK: [[@LINE+1]]:31: error: unexpected token in directive
212212 .symbol_resolver a4 $
213213 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
214 .symbol_resolver a4 // EOL COMMENT
214 .symbol_resolver a4 # EOL COMMENT
215215 // CHECK: [[@LINE+1]]:31: error: unexpected token in directive
216216 .private_extern a5 $
217217 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
218 .private_extern a5 // EOL COMMENT
218 .private_extern a5 # EOL COMMENT
219219 // CHECK: [[@LINE+1]]:31: error: unexpected token in directive
220220 .reference a6 $
221221 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
222 .reference a6 // EOL COMMENT
222 .reference a6 # EOL COMMENT
223223 // CHECK: [[@LINE+1]]:31: error: unexpected token in directive
224224 .weak_definition a7 $
225225 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
226 .weak_definition a7 // EOL COMMENT
226 .weak_definition a7 # EOL COMMENT
227227 // CHECK: [[@LINE+1]]:31: error: unexpected token in directive
228228 .weak_reference a8 $
229229 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
230 .weak_reference a8 // EOL COMMENT
230 .weak_reference a8 # EOL COMMENT
231231 // CHECK: [[@LINE+1]]:31: error: unexpected token in directive
232232 .weak_def_can_be_hidden a9 $
233233 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
234 .weak_def_can_be_hidden a9 // EOL COMMENT
234 .weak_def_can_be_hidden a9 # EOL COMMENT
235235 // CHECK: [[@LINE+1]]:12: error: .warning argument must be a string
236236 .warning $
237237 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
238 .warning // EOL COMMENT
238 .warning # EOL COMMENT
239239 // CHECK: [[@LINE+1]]:21: error: expected end of statement in '.warning' directive
240240 .warning "warning" $
241241 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
242 .warning "warning" // EOL COMMENT
242 .warning "warning" # EOL COMMENT
243243
244244
245245 // CHECK: [[@LINE+1]]:17: error: unexpected token in '.cfi_startproc' directive
246246 .cfi_startproc $
247247 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
248 .cfi_startproc // EOL COMMENT
248 .cfi_startproc # EOL COMMENT
249249 .cfi_endproc
250250 // CHECK: [[@LINE+1]]:24: error: unexpected token in '.cfi_startproc' directive
251251 .cfi_startproc simple $
252252 // CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
253 .cfi_startproc simple // EOL COMMENT
253 .cfi_startproc simple # EOL COMMENT
254254 .cfi_endproc
255255
256256