diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/MC/MCParser/AsmParser.cpp | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index bd5956f9b48..41ad1642d28 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -1528,6 +1528,11 @@ bool AsmParser::HandleMacroEntry(StringRef Name, SMLoc NameLoc,      }      Lex();    } +  // If there weren't any arguments, erase the token vector so everything +  // else knows that. Leaving around the vestigal empty token list confuses +  // things. +  if (MacroArguments.size() == 1 && MacroArguments.back().empty()) +    MacroArguments.clear();    // Macro instantiation is lexical, unfortunately. We construct a new buffer    // to hold the macro body with substitutions. | 

