File tree Expand file tree Collapse file tree 2 files changed +3
-18
lines changed Expand file tree Collapse file tree 2 files changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -3008,20 +3008,13 @@ bool AsmParser::parseAngleBracketString(std::string &Data) {
3008
3008
}
3009
3009
3010
3010
// / parseDirectiveAscii:
3011
- // ::= .ascii [ "string"+ ( , "string"+ )* ]
3012
- // / ::= ( .asciz | .string ) [ "string" ( , "string" )* ]
3011
+ // / ::= ( .ascii | .asciz | .string ) [ "string" ( , "string" )* ]
3013
3012
bool AsmParser::parseDirectiveAscii (StringRef IDVal, bool ZeroTerminated) {
3014
3013
auto parseOp = [&]() -> bool {
3015
3014
std::string Data;
3016
- if (checkForValidSection ())
3015
+ if (checkForValidSection () || parseEscapedString (Data) )
3017
3016
return true ;
3018
- // Only support spaces as separators for .ascii directive for now. See the
3019
- // discusssion at https://reviews.llvm.org/D91460 for more details
3020
- do {
3021
- if (parseEscapedString (Data))
3022
- return true ;
3023
- getStreamer ().emitBytes (Data);
3024
- } while (!ZeroTerminated && getTok ().is (AsmToken::String));
3017
+ getStreamer ().emitBytes (Data);
3025
3018
if (ZeroTerminated)
3026
3019
getStreamer ().emitBytes (StringRef (" \0 " , 1 ));
3027
3020
return false ;
Original file line number Diff line number Diff line change @@ -48,11 +48,3 @@ TEST6:
48
48
TEST7:
49
49
.ascii "\x64\Xa6B"
50
50
.ascii "\xface\x0Fe"
51
-
52
- # CHECK-LABEL: TEST8:
53
- # CHECK-NEXT: .byte 65
54
- # CHECK-NEXT: .byte 66
55
- # CHECK-NEXT: .byte 67
56
- # CHECK-NEXT: .byte 68
57
- TEST8:
58
- .ascii "A" , "B" "C" , "D"
You can’t perform that action at this time.
0 commit comments