| author | |
| committer | |
| log | 816b69a3443c749c50a5eea4c62c0495b55fc619 |
| tree | d4be33ac1d90bc683c13abb24564ed901854f0d8 |
| parent | f4317e4387925bfac93a517c1dbd28517740e021 |
| signature |
2 files changed, 4 insertions(+), 2 deletions(-)
src/zig_clang_cc1_main.cpp+2-1| ... | @@ -36,6 +36,7 @@ | ... | @@ -36,6 +36,7 @@ |
| 36 | #include "llvm/Support/ErrorHandling.h" | 36 | #include "llvm/Support/ErrorHandling.h" |
| 37 | #include "llvm/Support/ManagedStatic.h" | 37 | #include "llvm/Support/ManagedStatic.h" |
| 38 | #include "llvm/Support/Path.h" | 38 | #include "llvm/Support/Path.h" |
| 39 | #include "llvm/Support/Process.h" | ||
| 39 | #include "llvm/Support/Signals.h" | 40 | #include "llvm/Support/Signals.h" |
| 40 | #include "llvm/Support/TargetRegistry.h" | 41 | #include "llvm/Support/TargetRegistry.h" |
| 41 | #include "llvm/Support/TargetSelect.h" | 42 | #include "llvm/Support/TargetSelect.h" |
| ... | @@ -69,7 +70,7 @@ static void LLVMErrorHandler(void *UserData, const std::string &Message, | ... | @@ -69,7 +70,7 @@ static void LLVMErrorHandler(void *UserData, const std::string &Message, |
| 69 | // We cannot recover from llvm errors. When reporting a fatal error, exit | 70 | // We cannot recover from llvm errors. When reporting a fatal error, exit |
| 70 | // with status 70 to generate crash diagnostics. For BSD systems this is | 71 | // with status 70 to generate crash diagnostics. For BSD systems this is |
| 71 | // defined as an internal software error. Otherwise, exit with status 1. | 72 | // defined as an internal software error. Otherwise, exit with status 1. |
| 72 | exit(GenCrashDiag ? 70 : 1); | 73 | llvm::sys::Process::Exit(GenCrashDiag ? 70 : 1); |
| 73 | } | 74 | } |
| 74 | 75 | ||
| 75 | #ifdef CLANG_HAVE_RLIMITS | 76 | #ifdef CLANG_HAVE_RLIMITS |
src/zig_clang_cc1as_main.cpp+2-1| ... | @@ -46,6 +46,7 @@ | ... | @@ -46,6 +46,7 @@ |
| 46 | #include "llvm/Support/Host.h" | 46 | #include "llvm/Support/Host.h" |
| 47 | #include "llvm/Support/MemoryBuffer.h" | 47 | #include "llvm/Support/MemoryBuffer.h" |
| 48 | #include "llvm/Support/Path.h" | 48 | #include "llvm/Support/Path.h" |
| 49 | #include "llvm/Support/Process.h" | ||
| 49 | #include "llvm/Support/Signals.h" | 50 | #include "llvm/Support/Signals.h" |
| 50 | #include "llvm/Support/SourceMgr.h" | 51 | #include "llvm/Support/SourceMgr.h" |
| 51 | #include "llvm/Support/TargetRegistry.h" | 52 | #include "llvm/Support/TargetRegistry.h" |
| ... | @@ -547,7 +548,7 @@ static void LLVMErrorHandler(void *UserData, const std::string &Message, | ... | @@ -547,7 +548,7 @@ static void LLVMErrorHandler(void *UserData, const std::string &Message, |
| 547 | Diags.Report(diag::err_fe_error_backend) << Message; | 548 | Diags.Report(diag::err_fe_error_backend) << Message; |
| 548 | 549 | ||
| 549 | // We cannot recover from llvm errors. | 550 | // We cannot recover from llvm errors. |
| 550 | exit(1); | 551 | sys::Process::Exit(1); |
| 551 | } | 552 | } |
| 552 | 553 | ||
| 553 | int cc1as_main(ArrayRef<const char *> Argv, const char *Argv0, void *MainAddr) { | 554 | int cc1as_main(ArrayRef<const char *> Argv, const char *Argv0, void *MainAddr) { |