clone: Collection of generic functions for LLVM objects

cloneR Documentation

Collection of generic functions for LLVM objects

Description

These are some of the generic functions for LLVM

Usage

clone(x, ...)
eraseFromParent(x, delete = TRUE, ...)
getCalledFunction(obj, ...)
getDataLayout(from, asRef = FALSE, ...)
getDescription(x, ...)
getElementTypes(x, ...)
getModule(obj, ...)
getNumElements(x, ...)
getParent(x, ...)
getReturnType(obj, ...)
hasMetadata(x, ...)
hasMetadataOtherThanDebugLoc(x, ...)
isArithmeticShift(x, ...)
isAssociative(x, ...)
isBinaryOp(x, ...)
isCommutative(x, ...)
isLogicalShift(x, ...)
isSafeToSpeculativelyExecute(x, ...)
isShift(x, ...)
isTerminator(x, ...)
mayHaveSideEffects(x, ...)
mayReadFromMemory(x, ...)
mayThrow(x, ...)
mayWriteToMemory(x, ...)
setDataLayout(x, value, ...)

Arguments

x, obj

the object to be queried or whose data layout is to be set. Currently, there are only methods forsetDataLayout for a Module

...

additional arguments for methods

delete

a logical value indicating whether to not only remove from the parent but also destroy the object

from

the object whose data layout will be set

value

a character string describing the data layout. See the LLVM documentation for the Module class http://llvm.org/docs/LangRef.html#data-layout.

asRef

scalar logical indicating whether we want a reference to the DataLayout object or just a description of it.

Note

getReturnType identifies the type of the return value in the Function definition/declaration. However, it may not correspond to what you might expect. LLVM may adapat a C/C++ routine that returns a structure or a C++ object directly (not by reference) to instead return void and add the address of such an object as the first parameter. This will have the sret attribute set on the corresponding parameter. See hasStructRet.

Author(s)

Duncan Temple Lang

References

LLVM Documentation http://llvm.org/docs/

See Also

hasStructRet

Examples

dl = getDataLayoutString()
m = Module()
getDataLayout(m)
setDataLayout(m,  dl)
getDataLayout(m)

duncantl/Rllvm documentation built on April 23, 2024, 6:14 p.m.