llvm.org GIT mirror llvm / 94afbc6
[Win32] Let utils/not aware of abort(), aka llvm_unreachable(), in msvcrt. It has exit code as 3. abort(), aka unreachable, may be handled as crash. FIXME: Could we move this into Win32/Program.inc? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210895 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 5 years ago
1 changed file(s) with 7 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
3131 std::string ErrMsg;
3232 int Result = sys::ExecuteAndWait(Program, argv, nullptr, nullptr, 0, 0,
3333 &ErrMsg);
34 #ifdef _WIN32
35 // Handle abort() in msvcrt -- It has exit code as 3.
36 // abort(), aka unreachable, may be handled as crash.
37 // FIXME: Could we move this into Win32/Program.inc?
38 if (Result == 3)
39 Result = -3;
40 #endif
3441 if (Result < 0) {
3542 errs() << "Error: " << ErrMsg << "\n";
3643 if (ExpectCrash)