LLVM 20.0.0git
|
Modules represent the top-level structure in an LLVM program. More...
Functions | |
LLVMModuleRef | LLVMModuleCreateWithName (const char *ModuleID) |
Create a new, empty module in the global context. | |
LLVMModuleRef | LLVMModuleCreateWithNameInContext (const char *ModuleID, LLVMContextRef C) |
Create a new, empty module in a specific context. | |
LLVMModuleRef | LLVMCloneModule (LLVMModuleRef M) |
Return an exact copy of the specified module. | |
void | LLVMDisposeModule (LLVMModuleRef M) |
Destroy a module instance. | |
LLVMBool | LLVMIsNewDbgInfoFormat (LLVMModuleRef M) |
Soon to be deprecated. | |
void | LLVMSetIsNewDbgInfoFormat (LLVMModuleRef M, LLVMBool UseNewFormat) |
Soon to be deprecated. | |
const char * | LLVMGetModuleIdentifier (LLVMModuleRef M, size_t *Len) |
Obtain the identifier of a module. | |
void | LLVMSetModuleIdentifier (LLVMModuleRef M, const char *Ident, size_t Len) |
Set the identifier of a module to a string Ident with length Len. | |
const char * | LLVMGetSourceFileName (LLVMModuleRef M, size_t *Len) |
Obtain the module's original source file name. | |
void | LLVMSetSourceFileName (LLVMModuleRef M, const char *Name, size_t Len) |
Set the original source file name of a module to a string Name with length Len. | |
const char * | LLVMGetDataLayoutStr (LLVMModuleRef M) |
Obtain the data layout for a module. | |
const char * | LLVMGetDataLayout (LLVMModuleRef M) |
void | LLVMSetDataLayout (LLVMModuleRef M, const char *DataLayoutStr) |
Set the data layout for a module. | |
const char * | LLVMGetTarget (LLVMModuleRef M) |
Obtain the target triple for a module. | |
void | LLVMSetTarget (LLVMModuleRef M, const char *Triple) |
Set the target triple for a module. | |
LLVMModuleFlagEntry * | LLVMCopyModuleFlagsMetadata (LLVMModuleRef M, size_t *Len) |
Returns the module flags as an array of flag-key-value triples. | |
void | LLVMDisposeModuleFlagsMetadata (LLVMModuleFlagEntry *Entries) |
Destroys module flags metadata entries. | |
LLVMModuleFlagBehavior | LLVMModuleFlagEntriesGetFlagBehavior (LLVMModuleFlagEntry *Entries, unsigned Index) |
Returns the flag behavior for a module flag entry at a specific index. | |
const char * | LLVMModuleFlagEntriesGetKey (LLVMModuleFlagEntry *Entries, unsigned Index, size_t *Len) |
Returns the key for a module flag entry at a specific index. | |
LLVMMetadataRef | LLVMModuleFlagEntriesGetMetadata (LLVMModuleFlagEntry *Entries, unsigned Index) |
Returns the metadata for a module flag entry at a specific index. | |
LLVMMetadataRef | LLVMGetModuleFlag (LLVMModuleRef M, const char *Key, size_t KeyLen) |
Add a module-level flag to the module-level flags metadata if it doesn't already exist. | |
void | LLVMAddModuleFlag (LLVMModuleRef M, LLVMModuleFlagBehavior Behavior, const char *Key, size_t KeyLen, LLVMMetadataRef Val) |
Add a module-level flag to the module-level flags metadata if it doesn't already exist. | |
void | LLVMDumpModule (LLVMModuleRef M) |
Dump a representation of a module to stderr. | |
LLVMBool | LLVMPrintModuleToFile (LLVMModuleRef M, const char *Filename, char **ErrorMessage) |
Print a representation of a module to a file. | |
char * | LLVMPrintModuleToString (LLVMModuleRef M) |
Return a string representation of the module. | |
const char * | LLVMGetModuleInlineAsm (LLVMModuleRef M, size_t *Len) |
Get inline assembly for a module. | |
void | LLVMSetModuleInlineAsm2 (LLVMModuleRef M, const char *Asm, size_t Len) |
Set inline assembly for a module. | |
void | LLVMAppendModuleInlineAsm (LLVMModuleRef M, const char *Asm, size_t Len) |
Append inline assembly to a module. | |
LLVMValueRef | LLVMGetInlineAsm (LLVMTypeRef Ty, const char *AsmString, size_t AsmStringSize, const char *Constraints, size_t ConstraintsSize, LLVMBool HasSideEffects, LLVMBool IsAlignStack, LLVMInlineAsmDialect Dialect, LLVMBool CanThrow) |
Create the specified uniqued inline asm string. | |
const char * | LLVMGetInlineAsmAsmString (LLVMValueRef InlineAsmVal, size_t *Len) |
Get the template string used for an inline assembly snippet. | |
const char * | LLVMGetInlineAsmConstraintString (LLVMValueRef InlineAsmVal, size_t *Len) |
Get the raw constraint string for an inline assembly snippet. | |
LLVMInlineAsmDialect | LLVMGetInlineAsmDialect (LLVMValueRef InlineAsmVal) |
Get the dialect used by the inline asm snippet. | |
LLVMTypeRef | LLVMGetInlineAsmFunctionType (LLVMValueRef InlineAsmVal) |
Get the function type of the inline assembly snippet. | |
LLVMBool | LLVMGetInlineAsmHasSideEffects (LLVMValueRef InlineAsmVal) |
Get if the inline asm snippet has side effects. | |
LLVMBool | LLVMGetInlineAsmNeedsAlignedStack (LLVMValueRef InlineAsmVal) |
Get if the inline asm snippet needs an aligned stack. | |
LLVMBool | LLVMGetInlineAsmCanUnwind (LLVMValueRef InlineAsmVal) |
Get if the inline asm snippet may unwind the stack. | |
LLVMContextRef | LLVMGetModuleContext (LLVMModuleRef M) |
Obtain the context to which this module is associated. | |
LLVMTypeRef | LLVMGetTypeByName (LLVMModuleRef M, const char *Name) |
Deprecated: Use LLVMGetTypeByName2 instead. | |
LLVMNamedMDNodeRef | LLVMGetFirstNamedMetadata (LLVMModuleRef M) |
Obtain an iterator to the first NamedMDNode in a Module. | |
LLVMNamedMDNodeRef | LLVMGetLastNamedMetadata (LLVMModuleRef M) |
Obtain an iterator to the last NamedMDNode in a Module. | |
LLVMNamedMDNodeRef | LLVMGetNextNamedMetadata (LLVMNamedMDNodeRef NamedMDNode) |
Advance a NamedMDNode iterator to the next NamedMDNode. | |
LLVMNamedMDNodeRef | LLVMGetPreviousNamedMetadata (LLVMNamedMDNodeRef NamedMDNode) |
Decrement a NamedMDNode iterator to the previous NamedMDNode. | |
LLVMNamedMDNodeRef | LLVMGetNamedMetadata (LLVMModuleRef M, const char *Name, size_t NameLen) |
Retrieve a NamedMDNode with the given name, returning NULL if no such node exists. | |
LLVMNamedMDNodeRef | LLVMGetOrInsertNamedMetadata (LLVMModuleRef M, const char *Name, size_t NameLen) |
Retrieve a NamedMDNode with the given name, creating a new node if no such node exists. | |
const char * | LLVMGetNamedMetadataName (LLVMNamedMDNodeRef NamedMD, size_t *NameLen) |
Retrieve the name of a NamedMDNode. | |
unsigned | LLVMGetNamedMetadataNumOperands (LLVMModuleRef M, const char *Name) |
Obtain the number of operands for named metadata in a module. | |
void | LLVMGetNamedMetadataOperands (LLVMModuleRef M, const char *Name, LLVMValueRef *Dest) |
Obtain the named metadata operands for a module. | |
void | LLVMAddNamedMetadataOperand (LLVMModuleRef M, const char *Name, LLVMValueRef Val) |
Add an operand to named metadata. | |
const char * | LLVMGetDebugLocDirectory (LLVMValueRef Val, unsigned *Length) |
Return the directory of the debug location for this value, which must be an llvm::Instruction, llvm::GlobalVariable, or llvm::Function. | |
const char * | LLVMGetDebugLocFilename (LLVMValueRef Val, unsigned *Length) |
Return the filename of the debug location for this value, which must be an llvm::Instruction, llvm::GlobalVariable, or llvm::Function. | |
unsigned | LLVMGetDebugLocLine (LLVMValueRef Val) |
Return the line number of the debug location for this value, which must be an llvm::Instruction, llvm::GlobalVariable, or llvm::Function. | |
unsigned | LLVMGetDebugLocColumn (LLVMValueRef Val) |
Return the column number of the debug location for this value, which must be an llvm::Instruction. | |
LLVMValueRef | LLVMAddFunction (LLVMModuleRef M, const char *Name, LLVMTypeRef FunctionTy) |
Add a function to a module under a specified name. | |
LLVMValueRef | LLVMGetNamedFunction (LLVMModuleRef M, const char *Name) |
Obtain a Function value from a Module by its name. | |
LLVMValueRef | LLVMGetNamedFunctionWithLength (LLVMModuleRef M, const char *Name, size_t Length) |
Obtain a Function value from a Module by its name. | |
LLVMValueRef | LLVMGetFirstFunction (LLVMModuleRef M) |
Obtain an iterator to the first Function in a Module. | |
LLVMValueRef | LLVMGetLastFunction (LLVMModuleRef M) |
Obtain an iterator to the last Function in a Module. | |
LLVMValueRef | LLVMGetNextFunction (LLVMValueRef Fn) |
Advance a Function iterator to the next Function. | |
LLVMValueRef | LLVMGetPreviousFunction (LLVMValueRef Fn) |
Decrement a Function iterator to the previous Function. | |
void | LLVMSetModuleInlineAsm (LLVMModuleRef M, const char *Asm) |
Deprecated: Use LLVMSetModuleInlineAsm2 instead. | |
Modules represent the top-level structure in an LLVM program.
An LLVM module is effectively a translation unit or a collection of translation units merged together.
LLVMValueRef LLVMAddFunction | ( | LLVMModuleRef | M, |
const char * | Name, | ||
LLVMTypeRef | FunctionTy | ||
) |
Add a function to a module under a specified name.
Definition at line 2390 of file Core.cpp.
References llvm::Function::Create(), llvm::GlobalValue::ExternalLinkage, Name, unwrap(), and llvm::wrap().
void LLVMAddModuleFlag | ( | LLVMModuleRef | M, |
LLVMModuleFlagBehavior | Behavior, | ||
const char * | Key, | ||
size_t | KeyLen, | ||
LLVMMetadataRef | Val | ||
) |
Add a module-level flag to the module-level flags metadata if it doesn't already exist.
Definition at line 427 of file Core.cpp.
References map_to_llvmModFlagBehavior(), and unwrap().
void LLVMAddNamedMetadataOperand | ( | LLVMModuleRef | M, |
const char * | Name, | ||
LLVMValueRef | Val | ||
) |
Add an operand to named metadata.
Definition at line 1448 of file Core.cpp.
References extractMDNode(), N, Name, and unwrap().
void LLVMAppendModuleInlineAsm | ( | LLVMModuleRef | M, |
const char * | Asm, | ||
size_t | Len | ||
) |
LLVMModuleRef LLVMCloneModule | ( | LLVMModuleRef | M | ) |
Return an exact copy of the specified module.
Definition at line 220 of file CloneModule.cpp.
References llvm::CloneModule(), llvm::release, llvm::unwrap(), and llvm::wrap().
LLVMModuleFlagEntry * LLVMCopyModuleFlagsMetadata | ( | LLVMModuleRef | M, |
size_t * | Len | ||
) |
Returns the module flags as an array of flag-key-value triples.
The caller is responsible for freeing this array by calling LLVMDisposeModuleFlagsMetadata
.
Definition at line 378 of file Core.cpp.
References map_from_llvmModFlagBehavior(), llvm::safe_malloc(), llvm::SmallVectorBase< Size_T >::size(), unwrap(), and llvm::wrap().
void LLVMDisposeModule | ( | LLVMModuleRef | M | ) |
void LLVMDisposeModuleFlagsMetadata | ( | LLVMModuleFlagEntry * | Entries | ) |
void LLVMDumpModule | ( | LLVMModuleRef | M | ) |
Dump a representation of a module to stderr.
Definition at line 444 of file Core.cpp.
References llvm::errs(), llvm::BasicBlock::print(), and unwrap().
const char * LLVMGetDataLayout | ( | LLVMModuleRef | M | ) |
Definition at line 314 of file Core.cpp.
References LLVMGetDataLayoutStr().
const char * LLVMGetDataLayoutStr | ( | LLVMModuleRef | M | ) |
Obtain the data layout for a module.
LLVMGetDataLayout is DEPRECATED, as the name is not only incorrect, but match the name of another method on the module. Prefer the use of LLVMGetDataLayoutStr, which is not ambiguous.
Definition at line 310 of file Core.cpp.
References unwrap().
Referenced by LLVMGetDataLayout().
unsigned LLVMGetDebugLocColumn | ( | LLVMValueRef | Val | ) |
Return the column number of the debug location for this value, which must be an llvm::Instruction.
Definition at line 1528 of file Core.cpp.
References llvm::CallingConv::C, DL, I, and unwrap().
const char * LLVMGetDebugLocDirectory | ( | LLVMValueRef | Val, |
unsigned * | Length | ||
) |
Return the directory of the debug location for this value, which must be an llvm::Instruction, llvm::GlobalVariable, or llvm::Function.
Definition at line 1458 of file Core.cpp.
References assert(), llvm::StringRef::data(), DL, F, I, llvm::Length, llvm::SmallVectorBase< Size_T >::size(), llvm::StringRef::size(), and unwrap().
const char * LLVMGetDebugLocFilename | ( | LLVMValueRef | Val, |
unsigned * | Length | ||
) |
Return the filename of the debug location for this value, which must be an llvm::Instruction, llvm::GlobalVariable, or llvm::Function.
Definition at line 1482 of file Core.cpp.
References assert(), llvm::StringRef::data(), DL, F, I, llvm::Length, llvm::SmallVectorBase< Size_T >::size(), llvm::StringRef::size(), and unwrap().
unsigned LLVMGetDebugLocLine | ( | LLVMValueRef | Val | ) |
Return the line number of the debug location for this value, which must be an llvm::Instruction, llvm::GlobalVariable, or llvm::Function.
Definition at line 1506 of file Core.cpp.
References assert(), DL, F, I, llvm::SmallVectorBase< Size_T >::size(), and unwrap().
LLVMValueRef LLVMGetFirstFunction | ( | LLVMModuleRef | M | ) |
Obtain an iterator to the first Function in a Module.
Definition at line 2405 of file Core.cpp.
References I, Mod, unwrap(), and llvm::wrap().
LLVMNamedMDNodeRef LLVMGetFirstNamedMetadata | ( | LLVMModuleRef | M | ) |
LLVMValueRef LLVMGetInlineAsm | ( | LLVMTypeRef | Ty, |
const char * | AsmString, | ||
size_t | AsmStringSize, | ||
const char * | Constraints, | ||
size_t | ConstraintsSize, | ||
LLVMBool | HasSideEffects, | ||
LLVMBool | IsAlignStack, | ||
LLVMInlineAsmDialect | Dialect, | ||
LLVMBool | CanThrow | ||
) |
Create the specified uniqued inline asm string.
Definition at line 500 of file Core.cpp.
References llvm::InlineAsm::AD_ATT, llvm::InlineAsm::AD_Intel, llvm::InlineAsm::get(), LLVMInlineAsmDialectATT, LLVMInlineAsmDialectIntel, and llvm::wrap().
const char * LLVMGetInlineAsmAsmString | ( | LLVMValueRef | InlineAsmVal, |
size_t * | Len | ||
) |
LLVMBool LLVMGetInlineAsmCanUnwind | ( | LLVMValueRef | InlineAsmVal | ) |
const char * LLVMGetInlineAsmConstraintString | ( | LLVMValueRef | InlineAsmVal, |
size_t * | Len | ||
) |
LLVMInlineAsmDialect LLVMGetInlineAsmDialect | ( | LLVMValueRef | InlineAsmVal | ) |
Get the dialect used by the inline asm snippet.
Definition at line 539 of file Core.cpp.
References llvm::InlineAsm::AD_ATT, llvm::InlineAsm::AD_Intel, llvm_unreachable, LLVMInlineAsmDialectATT, and LLVMInlineAsmDialectIntel.
LLVMTypeRef LLVMGetInlineAsmFunctionType | ( | LLVMValueRef | InlineAsmVal | ) |
Get the function type of the inline assembly snippet.
The same type that was passed into LLVMGetInlineAsm originally
LLVMBool LLVMGetInlineAsmHasSideEffects | ( | LLVMValueRef | InlineAsmVal | ) |
LLVMBool LLVMGetInlineAsmNeedsAlignedStack | ( | LLVMValueRef | InlineAsmVal | ) |
LLVMValueRef LLVMGetLastFunction | ( | LLVMModuleRef | M | ) |
Obtain an iterator to the last Function in a Module.
Definition at line 2413 of file Core.cpp.
References I, Mod, unwrap(), and llvm::wrap().
LLVMNamedMDNodeRef LLVMGetLastNamedMetadata | ( | LLVMModuleRef | M | ) |
LLVMContextRef LLVMGetModuleContext | ( | LLVMModuleRef | M | ) |
Obtain the context to which this module is associated.
Definition at line 576 of file Core.cpp.
References unwrap(), and llvm::wrap().
LLVMMetadataRef LLVMGetModuleFlag | ( | LLVMModuleRef | M, |
const char * | Key, | ||
size_t | KeyLen | ||
) |
Add a module-level flag to the module-level flags metadata if it doesn't already exist.
Definition at line 422 of file Core.cpp.
References unwrap(), and llvm::wrap().
const char * LLVMGetModuleIdentifier | ( | LLVMModuleRef | M, |
size_t * | Len | ||
) |
const char * LLVMGetModuleInlineAsm | ( | LLVMModuleRef | M, |
size_t * | Len | ||
) |
LLVMValueRef LLVMGetNamedFunction | ( | LLVMModuleRef | M, |
const char * | Name | ||
) |
Obtain a Function value from a Module by its name.
The returned value corresponds to a llvm::Function value.
Definition at line 2396 of file Core.cpp.
References getFunction(), Name, unwrap(), and llvm::wrap().
LLVMValueRef LLVMGetNamedFunctionWithLength | ( | LLVMModuleRef | M, |
const char * | Name, | ||
size_t | Length | ||
) |
Obtain a Function value from a Module by its name.
The returned value corresponds to a llvm::Function value.
Definition at line 2400 of file Core.cpp.
References getFunction(), llvm::Length, Name, unwrap(), and llvm::wrap().
LLVMNamedMDNodeRef LLVMGetNamedMetadata | ( | LLVMModuleRef | M, |
const char * | Name, | ||
size_t | NameLen | ||
) |
Retrieve a NamedMDNode with the given name, returning NULL if no such node exists.
Definition at line 1395 of file Core.cpp.
References Name, unwrap(), and llvm::wrap().
const char * LLVMGetNamedMetadataName | ( | LLVMNamedMDNodeRef | NamedMD, |
size_t * | NameLen | ||
) |
Retrieve the name of a NamedMDNode.
Definition at line 1405 of file Core.cpp.
References llvm::StringRef::data(), llvm::NamedMDNode::getName(), llvm::StringRef::size(), and unwrap().
unsigned LLVMGetNamedMetadataNumOperands | ( | LLVMModuleRef | M, |
const char * | Name | ||
) |
void LLVMGetNamedMetadataOperands | ( | LLVMModuleRef | M, |
const char * | Name, | ||
LLVMValueRef * | Dest | ||
) |
Obtain the named metadata operands for a module.
The passed LLVMValueRef pointer should refer to an array of LLVMValueRef at least LLVMGetNamedMetadataNumOperands long. This array will be populated with the LLVMValueRef instances. Each instance corresponds to a llvm::MDNode.
Definition at line 1438 of file Core.cpp.
References llvm::MetadataAsValue::get(), llvm::BasicBlock::getContext(), N, Name, unwrap(), and llvm::wrap().
LLVMValueRef LLVMGetNextFunction | ( | LLVMValueRef | Fn | ) |
Advance a Function iterator to the next Function.
Returns NULL if the iterator was already at the end and there are no more functions.
Definition at line 2421 of file Core.cpp.
References I, and llvm::wrap().
LLVMNamedMDNodeRef LLVMGetNextNamedMetadata | ( | LLVMNamedMDNodeRef | NamedMDNode | ) |
Advance a NamedMDNode iterator to the next NamedMDNode.
Returns NULL if the iterator was already at the end and there are no more named metadata nodes.
Definition at line 1379 of file Core.cpp.
References llvm::NamedMDNode::getParent(), I, llvm::Module::named_metadata_end(), unwrap(), and llvm::wrap().
LLVMNamedMDNodeRef LLVMGetOrInsertNamedMetadata | ( | LLVMModuleRef | M, |
const char * | Name, | ||
size_t | NameLen | ||
) |
Retrieve a NamedMDNode with the given name, creating a new node if no such node exists.
Definition at line 1400 of file Core.cpp.
References Name, unwrap(), and llvm::wrap().
LLVMValueRef LLVMGetPreviousFunction | ( | LLVMValueRef | Fn | ) |
Decrement a Function iterator to the previous Function.
Returns NULL if the iterator was already at the beginning and there are no previous functions.
Definition at line 2429 of file Core.cpp.
References I, and llvm::wrap().
LLVMNamedMDNodeRef LLVMGetPreviousNamedMetadata | ( | LLVMNamedMDNodeRef | NamedMDNode | ) |
Decrement a NamedMDNode iterator to the previous NamedMDNode.
Returns NULL if the iterator was already at the beginning and there are no previous named metadata nodes.
Definition at line 1387 of file Core.cpp.
References llvm::NamedMDNode::getParent(), I, llvm::Module::named_metadata_begin(), unwrap(), and llvm::wrap().
const char * LLVMGetSourceFileName | ( | LLVMModuleRef | M, |
size_t * | Len | ||
) |
const char * LLVMGetTarget | ( | LLVMModuleRef | M | ) |
LLVMTypeRef LLVMGetTypeByName | ( | LLVMModuleRef | M, |
const char * | Name | ||
) |
Deprecated: Use LLVMGetTypeByName2 instead.
Definition at line 849 of file Core.cpp.
References llvm::StructType::getTypeByName(), Name, unwrap(), and llvm::wrap().
LLVMBool LLVMIsNewDbgInfoFormat | ( | LLVMModuleRef | M | ) |
Soon to be deprecated.
See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes
Returns true if the module is in the new debug info mode which uses non-instruction debug records instead of debug intrinsics for variable location tracking.
Definition at line 434 of file Core.cpp.
References llvm::BasicBlock::IsNewDbgInfoFormat, and unwrap().
LLVMModuleRef LLVMModuleCreateWithName | ( | const char * | ModuleID | ) |
Create a new, empty module in the global context.
This is equivalent to calling LLVMModuleCreateWithNameInContext with LLVMGetGlobalContext() as the context parameter.
Every invocation should be paired with LLVMDisposeModule() or memory will be leaked.
Definition at line 276 of file Core.cpp.
References getGlobalContext(), and llvm::wrap().
LLVMModuleRef LLVMModuleCreateWithNameInContext | ( | const char * | ModuleID, |
LLVMContextRef | C | ||
) |
Create a new, empty module in a specific context.
Every invocation should be paired with LLVMDisposeModule() or memory will be leaked.
Definition at line 280 of file Core.cpp.
References llvm::CallingConv::C, unwrap(), and llvm::wrap().
LLVMModuleFlagBehavior LLVMModuleFlagEntriesGetFlagBehavior | ( | LLVMModuleFlagEntry * | Entries, |
unsigned | Index | ||
) |
Returns the flag behavior for a module flag entry at a specific index.
Definition at line 400 of file Core.cpp.
References LLVMOpaqueModuleFlagEntry::Behavior.
const char * LLVMModuleFlagEntriesGetKey | ( | LLVMModuleFlagEntry * | Entries, |
unsigned | Index, | ||
size_t * | Len | ||
) |
Returns the key for a module flag entry at a specific index.
Definition at line 407 of file Core.cpp.
References LLVMOpaqueModuleFlagEntry::Key, and LLVMOpaqueModuleFlagEntry::KeyLen.
LLVMMetadataRef LLVMModuleFlagEntriesGetMetadata | ( | LLVMModuleFlagEntry * | Entries, |
unsigned | Index | ||
) |
Returns the metadata for a module flag entry at a specific index.
Definition at line 415 of file Core.cpp.
References LLVMOpaqueModuleFlagEntry::Metadata.
LLVMBool LLVMPrintModuleToFile | ( | LLVMModuleRef | M, |
const char * | Filename, | ||
char ** | ErrorMessage | ||
) |
Print a representation of a module to a file.
The ErrorMessage needs to be disposed with LLVMDisposeMessage. Returns 0 on success, 1 otherwise.
Definition at line 449 of file Core.cpp.
References llvm::raw_fd_ostream::close(), llvm::raw_fd_ostream::error(), llvm::raw_fd_ostream::has_error(), llvm::sys::fs::OF_TextWithCRLF, llvm::BasicBlock::print(), and unwrap().
char * LLVMPrintModuleToString | ( | LLVMModuleRef | M | ) |
Return a string representation of the module.
Use LLVMDisposeMessage to free the string.
Definition at line 471 of file Core.cpp.
References llvm::raw_ostream::flush(), llvm::BasicBlock::print(), and unwrap().
void LLVMSetDataLayout | ( | LLVMModuleRef | M, |
const char * | DataLayoutStr | ||
) |
void LLVMSetIsNewDbgInfoFormat | ( | LLVMModuleRef | M, |
LLVMBool | UseNewFormat | ||
) |
Soon to be deprecated.
See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes
Convert module into desired debug info format.
Definition at line 438 of file Core.cpp.
References llvm::BasicBlock::setIsNewDbgInfoFormat(), and unwrap().
void LLVMSetModuleIdentifier | ( | LLVMModuleRef | M, |
const char * | Ident, | ||
size_t | Len | ||
) |
void LLVMSetModuleInlineAsm | ( | LLVMModuleRef | M, |
const char * | Asm | ||
) |
void LLVMSetModuleInlineAsm2 | ( | LLVMModuleRef | M, |
const char * | Asm, | ||
size_t | Len | ||
) |
void LLVMSetSourceFileName | ( | LLVMModuleRef | M, |
const char * | Name, | ||
size_t | Len | ||
) |