LLVM 20.0.0git
Functions
Collaboration diagram for Bit Writer:

Functions

int LLVMWriteBitcodeToFile (LLVMModuleRef M, const char *Path)
 Writes a module to the specified path.
 
int LLVMWriteBitcodeToFD (LLVMModuleRef M, int FD, int ShouldClose, int Unbuffered)
 Writes a module to an open file descriptor.
 
int LLVMWriteBitcodeToFileHandle (LLVMModuleRef M, int Handle)
 Deprecated for LLVMWriteBitcodeToFD.
 
LLVMMemoryBufferRef LLVMWriteBitcodeToMemoryBuffer (LLVMModuleRef M)
 Writes a module to a new memory buffer and returns it.
 

Detailed Description

Function Documentation

◆ LLVMWriteBitcodeToFD()

int LLVMWriteBitcodeToFD ( LLVMModuleRef  M,
int  FD,
int  ShouldClose,
int  Unbuffered 
)

Writes a module to an open file descriptor.

Returns 0 on success.

Definition at line 31 of file BitWriter.cpp.

References OS, llvm::unwrap(), and llvm::WriteBitcodeToFile().

Referenced by LLVMWriteBitcodeToFileHandle().

◆ LLVMWriteBitcodeToFile()

int LLVMWriteBitcodeToFile ( LLVMModuleRef  M,
const char Path 
)

Writes a module to the specified path.

Returns 0 on success.

Definition at line 20 of file BitWriter.cpp.

References llvm::sys::fs::OF_None, OS, llvm::unwrap(), and llvm::WriteBitcodeToFile().

◆ LLVMWriteBitcodeToFileHandle()

int LLVMWriteBitcodeToFileHandle ( LLVMModuleRef  M,
int  Handle 
)

Deprecated for LLVMWriteBitcodeToFD.

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

Definition at line 39 of file BitWriter.cpp.

References LLVMWriteBitcodeToFD().

◆ LLVMWriteBitcodeToMemoryBuffer()

LLVMMemoryBufferRef LLVMWriteBitcodeToMemoryBuffer ( LLVMModuleRef  M)

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

Definition at line 43 of file BitWriter.cpp.

References llvm::MemoryBuffer::getMemBufferCopy(), OS, llvm::unwrap(), llvm::wrap(), and llvm::WriteBitcodeToFile().