@@ -363,29 +363,30 @@ int main(int argc, const char* argv[]) {
363363 }
364364
365365 if (options.extra .count (" output" ) == 0 ) {
366- std::cerr << " (no output file specified, not emitting output)\n " ;
367- } else {
368- if (options.debug ) {
369- std::cerr << " writing..." << std::endl;
370- }
371- ModuleWriter writer;
372- writer.setDebug (options.debug );
373- writer.setBinary (emitBinary);
374- writer.setDebugInfo (options.passOptions .debugInfo );
375- if (outputSourceMapFilename.size ()) {
376- writer.setSourceMapFilename (outputSourceMapFilename);
377- writer.setSourceMapUrl (outputSourceMapUrl);
378- }
379- writer.write (*curr, options.extra [" output" ]);
366+ std::cerr << " no output file specified, not emitting output\n " ;
367+ return 0 ;
368+ }
380369
381- if (extraFuzzCommand.size () > 0 ) {
382- auto secondOutput = runCommand (extraFuzzCommand);
383- std::cout << " [extra-fuzz-command second output:]\n "
384- << firstOutput << ' \n ' ;
385- if (firstOutput != secondOutput) {
386- std::cerr << " extra fuzz command output differs\n " ;
387- abort ();
388- }
370+ if (options.debug ) {
371+ std::cerr << " writing..." << std::endl;
372+ }
373+ ModuleWriter writer;
374+ writer.setDebug (options.debug );
375+ writer.setBinary (emitBinary);
376+ writer.setDebugInfo (options.passOptions .debugInfo );
377+ if (outputSourceMapFilename.size ()) {
378+ writer.setSourceMapFilename (outputSourceMapFilename);
379+ writer.setSourceMapUrl (outputSourceMapUrl);
380+ }
381+ writer.write (*curr, options.extra [" output" ]);
382+
383+ if (extraFuzzCommand.size () > 0 ) {
384+ auto secondOutput = runCommand (extraFuzzCommand);
385+ std::cout << " [extra-fuzz-command second output:]\n " << firstOutput << ' \n ' ;
386+ if (firstOutput != secondOutput) {
387+ std::cerr << " extra fuzz command output differs\n " ;
388+ abort ();
389389 }
390390 }
391+ return 0 ;
391392}
0 commit comments