summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/ExecutionEngine/OrcError/OrcError.cpp2
-rw-r--r--llvm/lib/ExecutionEngine/OrcError/RPCError.cpp5
-rw-r--r--llvm/lib/Support/Error.cpp7
3 files changed, 12 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/OrcError/OrcError.cpp b/llvm/lib/ExecutionEngine/OrcError/OrcError.cpp
index e6e9a095319..5eab246d4b4 100644
--- a/llvm/lib/ExecutionEngine/OrcError/OrcError.cpp
+++ b/llvm/lib/ExecutionEngine/OrcError/OrcError.cpp
@@ -14,6 +14,8 @@
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ManagedStatic.h"
+#include <type_traits>
+
using namespace llvm;
using namespace llvm::orc;
diff --git a/llvm/lib/ExecutionEngine/OrcError/RPCError.cpp b/llvm/lib/ExecutionEngine/OrcError/RPCError.cpp
index b77a526f571..3cf78fd9f7b 100644
--- a/llvm/lib/ExecutionEngine/OrcError/RPCError.cpp
+++ b/llvm/lib/ExecutionEngine/OrcError/RPCError.cpp
@@ -11,6 +11,11 @@
//===----------------------------------------------------------------------===//
#include "llvm/ExecutionEngine/Orc/RPC/RPCUtils.h"
+#include "llvm/Support/Error.h"
+#include "llvm/Support/raw_ostream.h"
+
+#include <system_error>
+#include <string>
char llvm::orc::rpc::RPCFatalError::ID = 0;
char llvm::orc::rpc::ConnectionClosed::ID = 0;
diff --git a/llvm/lib/Support/Error.cpp b/llvm/lib/Support/Error.cpp
index 9ea08c37478..27e0a49e9b8 100644
--- a/llvm/lib/Support/Error.cpp
+++ b/llvm/lib/Support/Error.cpp
@@ -10,6 +10,7 @@
#include "llvm/ADT/Twine.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ManagedStatic.h"
+#include "llvm/Support/Signals.h"
#include <system_error>
using namespace llvm;
@@ -103,11 +104,13 @@ std::error_code errorToErrorCode(Error Err) {
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
void Error::fatalUncheckedError() const {
dbgs() << "Program aborted due to an unhandled Error:\n";
- if (getPtr())
+ if (getPtr()) {
getPtr()->log(dbgs());
- else
+ dbgs() << "\n";
+ }else
dbgs() << "Error value was Success. (Note: Success values must still be "
"checked prior to being destroyed).\n";
+ PrintStackTrace();
abort();
}
#endif
OpenPOWER on IntegriCloud