From 6eae1e6bbf9cfa412fc300df6ee19949e4cd2fe9 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Wed, 21 May 2014 17:53:18 +0000 Subject: MC: loosen an overzealous assertion Permit active macro expansions when terminating the assembler if there were errors during the expansion. This would only trigger on invalid input when built with assertions. llvm-svn: 209309 --- llvm/lib/MC/MCParser/AsmParser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/MC/MCParser/AsmParser.cpp') diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index 633d1012481..ec2094d6715 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -528,7 +528,8 @@ AsmParser::AsmParser(SourceMgr &_SM, MCContext &_Ctx, MCStreamer &_Out, } AsmParser::~AsmParser() { - assert(ActiveMacros.empty() && "Unexpected active macro instantiation!"); + assert((HadError || ActiveMacros.empty()) && + "Unexpected active macro instantiation!"); // Destroy any macros. for (StringMap::iterator it = MacroMap.begin(), -- cgit v1.2.3