LLVM: lib/Bitcode/Writer/BitWriter.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
15using namespace llvm;
16
17
18
19
21 std::error_code EC;
23
24 if (EC)
25 return -1;
26
28 return 0;
29}
30
32 int Unbuffered) {
34
36 return 0;
37}
38
42
44 std::string Data;
46
49}
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.
A raw_ostream that writes to an std::string.
std::string & str()
Returns the string's reference.
int LLVMWriteBitcodeToFD(LLVMModuleRef M, int FD, int ShouldClose, int Unbuffered)
Writes a module to an open file descriptor.
Definition BitWriter.cpp:31
LLVMMemoryBufferRef LLVMWriteBitcodeToMemoryBuffer(LLVMModuleRef M)
Writes a module to a new memory buffer and returns it.
Definition BitWriter.cpp:43
int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path)
Writes a module to the specified path.
Definition BitWriter.cpp:20
int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int FileHandle)
Deprecated for LLVMWriteBitcodeToFD.
Definition BitWriter.cpp:39
struct LLVMOpaqueMemoryBuffer * LLVMMemoryBufferRef
LLVM uses a polymorphic type hierarchy which C cannot represent, therefore parameters must be passed ...
struct LLVMOpaqueModule * LLVMModuleRef
The top-level container for all other LLVM Intermediate Representation (IR) objects.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI void WriteBitcodeToFile(const Module &M, raw_ostream &Out, bool ShouldPreserveUseListOrder=false, const ModuleSummaryIndex *Index=nullptr, bool GenerateHash=false, ModuleHash *ModHash=nullptr)
Write the specified module to the specified raw output stream.
FunctionAddr VTableAddr uintptr_t uintptr_t Data
Attribute unwrap(LLVMAttributeRef Attr)
LLVMAttributeRef wrap(Attribute Attr)