Warning: This file is not a C or C++ file. It does not have highlighting.
1 | //===-- include/flang/Runtime/stop.h ----------------------------*- C++ -*-===// |
---|---|
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #ifndef FORTRAN_RUNTIME_STOP_H_ |
10 | #define FORTRAN_RUNTIME_STOP_H_ |
11 | |
12 | #include "flang/Runtime/c-or-cpp.h" |
13 | #include "flang/Runtime/entry-names.h" |
14 | #include <stdlib.h> |
15 | |
16 | FORTRAN_EXTERN_C_BEGIN |
17 | |
18 | // Program-initiated image stop |
19 | NORETURN void RTNAME(StopStatement)(int code DEFAULT_VALUE(EXIT_SUCCESS), |
20 | bool isErrorStop DEFAULT_VALUE(false), bool quiet DEFAULT_VALUE(false)); |
21 | NORETURN void RTNAME(StopStatementText)(const char *, size_t, |
22 | bool isErrorStop DEFAULT_VALUE(false), bool quiet DEFAULT_VALUE(false)); |
23 | void RTNAME(PauseStatement)(NO_ARGUMENTS); |
24 | void RTNAME(PauseStatementInt)(int); |
25 | void RTNAME(PauseStatementText)(const char *, size_t); |
26 | NORETURN void RTNAME(FailImageStatement)(NO_ARGUMENTS); |
27 | NORETURN void RTNAME(ProgramEndStatement)(NO_ARGUMENTS); |
28 | |
29 | // Extensions |
30 | NORETURN void RTNAME(Exit)(int status DEFAULT_VALUE(EXIT_SUCCESS)); |
31 | NORETURN void RTNAME(Abort)(NO_ARGUMENTS); |
32 | |
33 | // Crash with an error message when the program dynamically violates a Fortran |
34 | // constraint. |
35 | NORETURN void RTNAME(ReportFatalUserError)( |
36 | const char *message, const char *source, int line); |
37 | |
38 | FORTRAN_EXTERN_C_END |
39 | |
40 | #endif // FORTRAN_RUNTIME_STOP_H_ |
41 |
Warning: This file is not a C or C++ file. It does not have highlighting.