- // Output the bytecode file to stdout
- try {
- WriteBytecodeToFile(M, std::cout);
- } catch (const std::string &Error) {
- std::cerr << "Error writing file: " << Error << "\n";
- return 1;
- }
+ // Output the bitcode file to stdout
+ WriteBitcodeToFile(M, outs());