mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 19:26:05 +00:00

"default: CRASH_NO_CASE;" in place of prior macro. Original-commit: flang-compiler/f18@2108896155
22 lines
446 B
C++
22 lines
446 B
C++
#include "idioms.h"
|
|
#include <cstdarg>
|
|
#include <cstdio>
|
|
#include <cstdlib>
|
|
|
|
namespace Fortran {
|
|
|
|
[[noreturn]] void die(const char *msg, ...) {
|
|
va_list ap;
|
|
va_start(ap, msg);
|
|
std::fputs("\nfatal internal error: ", stderr);
|
|
std::vfprintf(stderr, msg, ap);
|
|
va_end(ap);
|
|
fputc('\n', stderr);
|
|
std::abort();
|
|
}
|
|
|
|
std::ostream &operator<<(std::ostream &o, const std::monostate &) {
|
|
return o << "(empty variant)";
|
|
}
|
|
} // namespace Fortran
|