diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:17:04 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:17:04 +0000 |
commit | b915e9e0fc85ba6f398b3fab0db6a81a8913af94 (patch) | |
tree | 98b8f811c7aff2547cab8642daf372d6c59502fb /lib/Support/Error.cpp | |
parent | 6421cca32f69ac849537a3cff78c352195e99f1b (diff) |
Notes
Diffstat (limited to 'lib/Support/Error.cpp')
-rw-r--r-- | lib/Support/Error.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/Support/Error.cpp b/lib/Support/Error.cpp index 6b22691eb1ad..4730c0b26ba0 100644 --- a/lib/Support/Error.cpp +++ b/lib/Support/Error.cpp @@ -11,6 +11,7 @@ #include "llvm/ADT/Twine.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/ManagedStatic.h" +#include <system_error> using namespace llvm; @@ -27,7 +28,7 @@ namespace { // deal with the Error value directly, rather than converting to error_code. class ErrorErrorCategory : public std::error_category { public: - const char *name() const LLVM_NOEXCEPT override { return "Error"; } + const char *name() const noexcept override { return "Error"; } std::string message(int condition) const override { switch (static_cast<ErrorErrorCode>(condition)) { @@ -111,3 +112,18 @@ void report_fatal_error(Error Err, bool GenCrashDiag) { } } + +#ifndef _MSC_VER +namespace llvm { + +// One of these two variables will be referenced by a symbol defined in +// llvm-config.h. We provide a link-time (or load time for DSO) failure when +// there is a mismatch in the build configuration of the API client and LLVM. +#if LLVM_ENABLE_ABI_BREAKING_CHECKS +int EnableABIBreakingChecks; +#else +int DisableABIBreakingChecks; +#endif + +} // end namespace llvm +#endif |