summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCParser/AsmParser.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-05-21 17:53:18 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-05-21 17:53:18 +0000
commit6eae1e6bbf9cfa412fc300df6ee19949e4cd2fe9 (patch)
tree293e3a6609494dec7148d9a4989d28aabf45e710 /llvm/lib/MC/MCParser/AsmParser.cpp
parent962a339bec1588c54c2a21e87aae9a20097cb8e5 (diff)
downloadbcm5719-llvm-6eae1e6bbf9cfa412fc300df6ee19949e4cd2fe9.tar.gz
bcm5719-llvm-6eae1e6bbf9cfa412fc300df6ee19949e4cd2fe9.zip
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
Diffstat (limited to 'llvm/lib/MC/MCParser/AsmParser.cpp')
-rw-r--r--llvm/lib/MC/MCParser/AsmParser.cpp3
1 files changed, 2 insertions, 1 deletions
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<MCAsmMacro *>::iterator it = MacroMap.begin(),
OpenPOWER on IntegriCloud