rocm.bindings.llvm.c.error#

2026-09-24

5 min read time

Applies to Linux and Windows

Advanced Micro Devices, Inc.

Attributes#

Classes#

LLVMOpaqueError

(No short description)

Functions#

has_symbol(→ bool)

LLVMGetErrorTypeId(Err)

Returns the type id for the given error instance, which must be a failure

LLVMConsumeError(Err)

Dispose of the given error without handling it.

LLVMCantFail(Err)

Report a fatal error if Err is a failure value.

LLVMGetErrorMessage(Err)

Returns the given string's error message.

LLVMDisposeErrorMessage(ErrMsg)

Dispose of the given error message.

LLVMGetStringErrorTypeId()

Returns the type id for llvm StringError.

LLVMCreateStringError(ErrMsg)

Create a StringError.

Module Contents#

rocm.bindings.llvm.c.error.has_symbol(name: str | bytes | bytearray) → bool#
class rocm.bindings.llvm.c.error.LLVMOpaqueError(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

rocm.bindings.llvm.c.error.LLVMErrorRef#
rocm.bindings.llvm.c.error.LLVMGetErrorTypeId(Err)#

Returns the type id for the given error instance, which must be a failure value (i.e.

non-null).

Args:
Err (LLVMOpaqueError/object):

(undocumented)

Returns:

None: (undocumented)

C signature

LLVMErrorTypeId LLVMGetErrorTypeId(LLVMErrorRef Err)
rocm.bindings.llvm.c.error.LLVMConsumeError(Err)#

Dispose of the given error without handling it.

This operation consumes the error, and the given LLVMErrorRef value is not usable once this call returns. Note: This method only needs to be called if the error is not being passed to some other consuming operation, e.g. LLVMGetErrorMessage.

Args:
Err (LLVMOpaqueError/object):

(undocumented)

C signature

void LLVMConsumeError(LLVMErrorRef Err)
rocm.bindings.llvm.c.error.LLVMCantFail(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.

Args:
Err (LLVMOpaqueError/object):

(undocumented)

C signature

void LLVMCantFail(LLVMErrorRef Err)
rocm.bindings.llvm.c.error.LLVMGetErrorMessage(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 LLVMDisposeErrorMessage.

Args:
Err (LLVMOpaqueError/object):

(undocumented)

Returns:

bytes: (undocumented)

C signature

char * LLVMGetErrorMessage(LLVMErrorRef Err)
rocm.bindings.llvm.c.error.LLVMDisposeErrorMessage(ErrMsg)#

Dispose of the given error message.

Args:
ErrMsg (CStr/object):

(undocumented)

C signature

void LLVMDisposeErrorMessage(char * ErrMsg)
rocm.bindings.llvm.c.error.LLVMGetStringErrorTypeId()#

Returns the type id for llvm StringError.

Returns:

None: (undocumented)

C signature

LLVMErrorTypeId LLVMGetStringErrorTypeId()
rocm.bindings.llvm.c.error.LLVMCreateStringError(ErrMsg)#

Create a StringError.

Args:
ErrMsg (CStr/object):

(undocumented)

Returns:

None: (undocumented)

C signature

LLVMErrorRef LLVMCreateStringError(const char * ErrMsg)