llvm-capstone/flang/idioms.cc
2018-01-30 11:53:33 -08:00

22 lines
433 B
C++

#include "idioms.h"
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
namespace Fortran {
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