int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int FileHandle)
Deprecated for LLVMWriteBitcodeToFD.
int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path)
Writes a module to the specified path.
struct LLVMOpaqueMemoryBuffer * LLVMMemoryBufferRef
Used to pass regions of memory through LLVM interfaces.
LLVMMemoryBufferRef LLVMWriteBitcodeToMemoryBuffer(LLVMModuleRef M)
Writes a module to a new memory buffer and returns it.
int LLVMWriteBitcodeToFD(LLVMModuleRef M, int FD, int ShouldClose, int Unbuffered)
Writes a module to an open file descriptor.
LLVMTargetDataRef wrap(const DataLayout *P)
DataLayout * unwrap(LLVMTargetDataRef P)
void WriteBitcodeToFile(const Module *M, raw_ostream &Out, bool ShouldPreserveUseListOrder=false)
Write the specified module to the specified raw output stream.
std::string & str()
Flushes the stream contents to the target string and returns the string's reference.
Module.h This file contains the declarations for the Module class.
static std::unique_ptr< MemoryBuffer > getMemBufferCopy(StringRef InputData, const Twine &BufferName="")
Open the specified memory range as a MemoryBuffer, copying the contents and taking ownership of it...
A raw_ostream that writes to a file descriptor.
struct LLVMOpaqueModule * LLVMModuleRef
The top-level container for all other LLVM Intermediate Representation (IR) objects.
A raw_ostream that writes to an std::string.