#include "llvm/Support/StreamingMemoryObject.h"
#pragma clang diagnostic pop
+#include <cstdio>
#include <fstream>
#include <iostream>
#include <thread>
-#if defined(HAVE_UNISTD_H)
-# include <unistd.h>
-#endif
-#if defined(_MSC_VER)
-# include <io.h>
-# include <fcntl.h>
-#endif
-
namespace Ice {
namespace {
llvm::raw_svector_ostream OS(Buffer);
OS << "LLVM ERROR: " << Reason << "\n";
llvm::StringRef MessageStr = OS.str();
- ssize_t written = ::write(2, MessageStr.data(), MessageStr.size());
+ ssize_t written =
+ ::fwrite(MessageStr.data(), sizeof(char), MessageStr.size(), ::stdout);
(void)written; // If something went wrong, we deliberately just give up.
// If we reached here, we are failing ungracefully. Run the interrupt handlers