LLVM  8.0.1
Functions
Collaboration diagram for Bit Writer:

Functions

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

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 32 of file BitWriter.cpp.

References 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 21 of file BitWriter.cpp.

References llvm::sys::fs::F_None, 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 40 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 44 of file BitWriter.cpp.

References llvm::Data, llvm::MemoryBuffer::getMemBufferCopy(), llvm::release, llvm::raw_string_ostream::str(), llvm::unwrap(), llvm::wrap(), and llvm::WriteBitcodeToFile().