aboutsummaryrefslogtreecommitdiff
path: root/src/llvm-c/Error.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/llvm-c/Error.h')
-rw-r--r--src/llvm-c/Error.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/llvm-c/Error.h b/src/llvm-c/Error.h
index 00746c701..874bbcfe8 100644
--- a/src/llvm-c/Error.h
+++ b/src/llvm-c/Error.h
@@ -14,7 +14,7 @@
#ifndef LLVM_C_ERROR_H
#define LLVM_C_ERROR_H
-#include "ExternC.h"
+#include "llvm-c/ExternC.h"
LLVM_C_EXTERN_C_BEGIN
@@ -52,6 +52,14 @@ LLVMErrorTypeId LLVMGetErrorTypeId(LLVMErrorRef Err);
void LLVMConsumeError(LLVMErrorRef Err);
/**
+ * Report a fatal error if Err is a failure value.
+ *
+ * This function can be used to wrap calls to fallible functions ONLY when it is
+ * known that the Error will always be a success value.
+ */
+void LLVMCantFail(LLVMErrorRef Err);
+
+/**
* Returns the given string's error message. This operation consumes the error,
* and the given LLVMErrorRef value is not usable once this call returns.
* The caller is responsible for disposing of the string by calling