diff options
Diffstat (limited to 'lib/MC/MCParser/AsmParser.cpp')
-rw-r--r-- | lib/MC/MCParser/AsmParser.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp index 24616b4..4e62689 100644 --- a/lib/MC/MCParser/AsmParser.cpp +++ b/lib/MC/MCParser/AsmParser.cpp @@ -138,7 +138,7 @@ const AsmToken &AsmParser::Lex() { return *tok; } -bool AsmParser::Run(bool NoInitialTextSection) { +bool AsmParser::Run(bool NoInitialTextSection, bool NoFinalize) { // Create the initial section, if requested. // // FIXME: Target hook & command line option for initial section. @@ -190,7 +190,9 @@ bool AsmParser::Run(bool NoInitialTextSection) { TheCondState.Ignore != StartingCondState.Ignore) return TokError("unmatched .ifs or .elses"); - if (!HadError) + // Finalize the output stream if there are no errors and if the client wants + // us to. + if (!HadError && !NoFinalize) Out.Finish(); return HadError; |