@@ -450,9 +450,6 @@ class MasmParser : public MCAsmParser {
450
450
// / Defaults to 1U, meaning Intel.
451
451
unsigned AssemblerDialect = 1U ;
452
452
453
- // / is Darwin compatibility enabled?
454
- bool IsDarwin = false ;
455
-
456
453
// / Are we parsing ms-style inline assembly?
457
454
bool ParsingMSInlineAsm = false ;
458
455
@@ -2589,24 +2586,6 @@ static bool isOperator(AsmToken::TokenKind kind) {
2589
2586
}
2590
2587
}
2591
2588
2592
- namespace {
2593
-
2594
- class AsmLexerSkipSpaceRAII {
2595
- public:
2596
- AsmLexerSkipSpaceRAII (AsmLexer &Lexer, bool SkipSpace) : Lexer(Lexer) {
2597
- Lexer.setSkipSpace (SkipSpace);
2598
- }
2599
-
2600
- ~AsmLexerSkipSpaceRAII () {
2601
- Lexer.setSkipSpace (true );
2602
- }
2603
-
2604
- private:
2605
- AsmLexer &Lexer;
2606
- };
2607
-
2608
- } // end anonymous namespace
2609
-
2610
2589
bool MasmParser::parseMacroArgument (const MCAsmMacroParameter *MP,
2611
2590
MCAsmMacroArgument &MA,
2612
2591
AsmToken::TokenKind EndTok) {
@@ -2633,43 +2612,12 @@ bool MasmParser::parseMacroArgument(const MCAsmMacroParameter *MP,
2633
2612
2634
2613
unsigned ParenLevel = 0 ;
2635
2614
2636
- // Darwin doesn't use spaces to delmit arguments.
2637
- AsmLexerSkipSpaceRAII ScopedSkipSpace (Lexer, IsDarwin);
2638
-
2639
- bool SpaceEaten;
2640
-
2641
2615
while (true ) {
2642
- SpaceEaten = false ;
2643
2616
if (Lexer.is (AsmToken::Eof) || Lexer.is (AsmToken::Equal))
2644
2617
return TokError (" unexpected token" );
2645
2618
2646
- if (ParenLevel == 0 ) {
2647
- if (Lexer.is (AsmToken::Comma))
2648
- break ;
2649
-
2650
- if (Lexer.is (AsmToken::Space)) {
2651
- SpaceEaten = true ;
2652
- Lex (); // Eat spaces.
2653
- }
2654
-
2655
- // Spaces can delimit parameters, but could also be part an expression.
2656
- // If the token after a space is an operator, add the token and the next
2657
- // one into this argument
2658
- if (!IsDarwin) {
2659
- if (isOperator (Lexer.getKind ()) && Lexer.isNot (EndTok)) {
2660
- MA.push_back (getTok ());
2661
- Lex ();
2662
-
2663
- // Whitespace after an operator can be ignored.
2664
- if (Lexer.is (AsmToken::Space))
2665
- Lex ();
2666
-
2667
- continue ;
2668
- }
2669
- }
2670
- if (SpaceEaten)
2671
- break ;
2672
- }
2619
+ if (ParenLevel == 0 && Lexer.is (AsmToken::Comma))
2620
+ break ;
2673
2621
2674
2622
// handleMacroEntry relies on not advancing the lexer here
2675
2623
// to be able to fill in the remaining default parameter values
0 commit comments