rocm.bindings.llvm.c.bitwriter#

2026-09-24

5 min read time

Applies to Linux and Windows

Advanced Micro Devices, Inc.

Functions#

has_symbol(→ bool)

LLVMWriteBitcodeToFile(M, Path)

Writes a module to the specified path. Returns 0 on success.

LLVMWriteBitcodeToFD(M, FD, ShouldClose, Unbuffered)

Writes a module to an open file descriptor. Returns 0 on success.

LLVMWriteBitcodeToFileHandle(M, Handle)

Deprecated for LLVMWriteBitcodeToFD.

LLVMWriteBitcodeToMemoryBuffer(M)

Writes a module to a new memory buffer and returns it.

Module Contents#

rocm.bindings.llvm.c.bitwriter.has_symbol(name: str | bytes | bytearray) → bool#
rocm.bindings.llvm.c.bitwriter.LLVMWriteBitcodeToFile(M, Path)#

Writes a module to the specified path. Returns 0 on success.

Args:
M (Pointer/object):

(undocumented)

Path (CStr/object):

(undocumented)

Returns:

int: (undocumented)

C signature

int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char * Path)
rocm.bindings.llvm.c.bitwriter.LLVMWriteBitcodeToFD(M, FD, ShouldClose, Unbuffered)#

Writes a module to an open file descriptor. Returns 0 on success.

Args:
M (Pointer/object):

(undocumented)

FD (int):

(undocumented)

ShouldClose (int):

(undocumented)

Unbuffered (int):

(undocumented)

Returns:

int: (undocumented)

C signature

int LLVMWriteBitcodeToFD(LLVMModuleRef M, int FD, int ShouldClose, int Unbuffered)
rocm.bindings.llvm.c.bitwriter.LLVMWriteBitcodeToFileHandle(M, Handle)#

Deprecated for LLVMWriteBitcodeToFD.

Writes a module to an open file descriptor. Returns 0 on success. Closes the Handle.

Args:
M (Pointer/object):

(undocumented)

Handle (int):

(undocumented)

Returns:

int: (undocumented)

C signature

int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int Handle)
rocm.bindings.llvm.c.bitwriter.LLVMWriteBitcodeToMemoryBuffer(M)#

Writes a module to a new memory buffer and returns it.

Args:
M (Pointer/object):

(undocumented)

Returns:

None: (undocumented)

C signature

LLVMMemoryBufferRef LLVMWriteBitcodeToMemoryBuffer(LLVMModuleRef M)