projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Windows: Add support for unicode command lines
[oota-llvm.git]
/
lib
/
Support
/
ErrorHandling.cpp
diff --git
a/lib/Support/ErrorHandling.cpp
b/lib/Support/ErrorHandling.cpp
index e6cc57db8243506c7a18067e6109dd4c7485d2fd..9425445a853a08552746d375dd0886e92e0e88d9 100644
(file)
--- a/
lib/Support/ErrorHandling.cpp
+++ b/
lib/Support/ErrorHandling.cpp
@@
-12,14
+12,14
@@
//
//===----------------------------------------------------------------------===//
//
//===----------------------------------------------------------------------===//
+#include "llvm/Support/ErrorHandling.h"
+#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Twine.h"
#include "llvm/ADT/Twine.h"
+#include "llvm/Config/config.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Debug.h"
-#include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/Threading.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/Threading.h"
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/Config/config.h"
+#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstdlib>
#include <cassert>
#include <cstdlib>
@@
-49,21
+49,21
@@
void llvm::remove_fatal_error_handler() {
ErrorHandler = 0;
}
ErrorHandler = 0;
}
-void llvm::report_fatal_error(const char *Reason) {
- report_fatal_error(Twine(Reason));
+void llvm::report_fatal_error(const char *Reason
, bool GenCrashDiag
) {
+ report_fatal_error(Twine(Reason)
, GenCrashDiag
);
}
}
-void llvm::report_fatal_error(const std::string &Reason) {
- report_fatal_error(Twine(Reason));
+void llvm::report_fatal_error(const std::string &Reason
, bool GenCrashDiag
) {
+ report_fatal_error(Twine(Reason)
, GenCrashDiag
);
}
}
-void llvm::report_fatal_error(StringRef Reason) {
- report_fatal_error(Twine(Reason));
+void llvm::report_fatal_error(StringRef Reason
, bool GenCrashDiag
) {
+ report_fatal_error(Twine(Reason)
, GenCrashDiag
);
}
}
-void llvm::report_fatal_error(const Twine &Reason) {
+void llvm::report_fatal_error(const Twine &Reason
, bool GenCrashDiag
) {
if (ErrorHandler) {
if (ErrorHandler) {
- ErrorHandler(ErrorHandlerUserData, Reason.str());
+ ErrorHandler(ErrorHandlerUserData, Reason.str()
, GenCrashDiag
);
} else {
// Blast the result out to stderr. We don't try hard to make sure this
// succeeds (e.g. handling EINTR) and we can't use errs() here because
} else {
// Blast the result out to stderr. We don't try hard to make sure this
// succeeds (e.g. handling EINTR) and we can't use errs() here because
@@
-96,4
+96,9
@@
void llvm::llvm_unreachable_internal(const char *msg, const char *file,
dbgs() << " at " << file << ":" << line;
dbgs() << "!\n";
abort();
dbgs() << " at " << file << ":" << line;
dbgs() << "!\n";
abort();
+#ifdef LLVM_BUILTIN_UNREACHABLE
+ // Windows systems and possibly others don't declare abort() to be noreturn,
+ // so use the unreachable builtin to avoid a Clang self-host warning.
+ LLVM_BUILTIN_UNREACHABLE;
+#endif
}
}