diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/Error.cpp')
| -rw-r--r-- | contrib/llvm-project/llvm/lib/Support/Error.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/llvm-project/llvm/lib/Support/Error.cpp b/contrib/llvm-project/llvm/lib/Support/Error.cpp index 93481ca916d2..d168b462a6eb 100644 --- a/contrib/llvm-project/llvm/lib/Support/Error.cpp +++ b/contrib/llvm-project/llvm/lib/Support/Error.cpp @@ -174,6 +174,13 @@ void report_fatal_error(Error Err, bool GenCrashDiag) { report_fatal_error(Twine(ErrMsg), GenCrashDiag); } +void reportFatalInternalError(Error Err) { + report_fatal_error(std::move(Err), /*GenCrashDiag=*/true); +} +void reportFatalUsageError(Error Err) { + report_fatal_error(std::move(Err), /*GenCrashDiag=*/false); +} + } // end namespace llvm LLVMErrorTypeId LLVMGetErrorTypeId(LLVMErrorRef Err) { @@ -182,6 +189,12 @@ LLVMErrorTypeId LLVMGetErrorTypeId(LLVMErrorRef Err) { void LLVMConsumeError(LLVMErrorRef Err) { consumeError(unwrap(Err)); } + + +void LLVMCantFail(LLVMErrorRef Err) { + cantFail(unwrap(Err)); +} + char *LLVMGetErrorMessage(LLVMErrorRef Err) { std::string Tmp = toString(unwrap(Err)); char *ErrMsg = new char[Tmp.size() + 1]; |
