| OLD | NEW |
| 1 //===--- llvm-as.cpp - The low-level LLVM assembler -----------------------===// | 1 //===--- llvm-as.cpp - The low-level LLVM assembler -----------------------===// |
| 2 // | 2 // |
| 3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 // This utility may be invoked in the following manner: | 10 // This utility may be invoked in the following manner: |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 } | 70 } |
| 71 | 71 |
| 72 std::error_code EC; | 72 std::error_code EC; |
| 73 std::unique_ptr<tool_output_file> Out( | 73 std::unique_ptr<tool_output_file> Out( |
| 74 new tool_output_file(OutputFilename, EC, sys::fs::F_None)); | 74 new tool_output_file(OutputFilename, EC, sys::fs::F_None)); |
| 75 if (EC) { | 75 if (EC) { |
| 76 errs() << EC.message() << '\n'; | 76 errs() << EC.message() << '\n'; |
| 77 exit(1); | 77 exit(1); |
| 78 } | 78 } |
| 79 | 79 |
| 80 if (Force || !CheckBitcodeOutputToConsole(Out->os(), true)) | 80 // @LOCALMOD-BEGIN |
| 81 if (Force || !CheckBitcodeOutputToConsole(Out->os(), true)) { |
| 81 WriteBitcodeToFile(M, Out->os()); | 82 WriteBitcodeToFile(M, Out->os()); |
| 83 } |
| 84 // @LOCALMOD-END |
| 82 | 85 |
| 83 // Declare success. | 86 // Declare success. |
| 84 Out->keep(); | 87 Out->keep(); |
| 85 } | 88 } |
| 86 | 89 |
| 87 int main(int argc, char **argv) { | 90 int main(int argc, char **argv) { |
| 88 // Print a stack trace if we signal out. | 91 // Print a stack trace if we signal out. |
| 89 sys::PrintStackTraceOnErrorSignal(); | 92 sys::PrintStackTraceOnErrorSignal(); |
| 90 PrettyStackTraceProgram X(argc, argv); | 93 PrettyStackTraceProgram X(argc, argv); |
| 91 LLVMContext &Context = getGlobalContext(); | 94 LLVMContext &Context = getGlobalContext(); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 111 } | 114 } |
| 112 } | 115 } |
| 113 | 116 |
| 114 if (DumpAsm) errs() << "Here's the assembly:\n" << *M.get(); | 117 if (DumpAsm) errs() << "Here's the assembly:\n" << *M.get(); |
| 115 | 118 |
| 116 if (!DisableOutput) | 119 if (!DisableOutput) |
| 117 WriteOutputFile(M.get()); | 120 WriteOutputFile(M.get()); |
| 118 | 121 |
| 119 return 0; | 122 return 0; |
| 120 } | 123 } |
| OLD | NEW |