+ }
+ }
+
+ if (DumpAsm) cerr << "Here's the assembly:\n" << *M.get();
+
+ if (OutputFilename != "") { // Specified an output filename?
+ if (OutputFilename != "-") { // Not stdout?
+ if (!Force && std::ifstream(OutputFilename.c_str())) {
+ // If force is not specified, make sure not to overwrite a file!
+ cerr << argv[0] << ": error opening '" << OutputFilename
+ << "': file exists!\n"
+ << "Use -f command line argument to force output\n";
+ return 1;
+ }
+ Out = new std::ofstream(OutputFilename.c_str(), std::ios::out |
+ std::ios::trunc | std::ios::binary);
+ } else { // Specified stdout
+ // FIXME: cout is not binary!
+ Out = &std::cout;