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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209309
91177308-0d34-0410-b5e6-
96231b3b80d8
}
AsmParser::~AsmParser() {
- assert(ActiveMacros.empty() && "Unexpected active macro instantiation!");
+ assert((HadError || ActiveMacros.empty()) &&
+ "Unexpected active macro instantiation!");
// Destroy any macros.
for (StringMap<MCAsmMacro *>::iterator it = MacroMap.begin(),
--- /dev/null
+// RUN: not llvm-mc -triple i686-linux -o /dev/null %s
+// REQUIRES: asserts
+
+ .macro macro parameter=0
+ .if \parameter
+ .else
+ .endm
+
+ macro 1
+