LLVMIRLanguageFrontend

Because we are using the C LLVM API, there are two possibly AST nodes that we need to consider: LLVMValueRef and LLVMBasicBlockRef. Because they do not share any class hierarchy, we need to resort to use Pointer as the AST node type here.

Constructors

Link copied to clipboard
constructor(language: Language<LLVMIRLanguageFrontend>, ctx: TranslationContext)

Properties

Link copied to clipboard

This contains a cache binding between an LLVMValueRef (representing a variable) and its Declaration in the graph. We need this, because this way we can look up and connect a Reference to its Declaration already in the language frontend. This in turn is needed because of the local/global system we cannot rely on the SymbolResolver.

Link copied to clipboard
Link copied to clipboard
override var ctx: TranslationContext
Link copied to clipboard
var ctxRef: LLVMContextRef?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val language: Language<out LanguageFrontend<Pointer, LLVMTypeRef>>
Link copied to clipboard
open override val namespace: Name?
Link copied to clipboard
val phiList: MutableList<LLVMValueRef>
Link copied to clipboard
open override val scope: Scope?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
open fun cleanup()
Link copied to clipboard
Link copied to clipboard
open override fun codeOf(astNode: Pointer): String?
Link copied to clipboard
fun getNameOf(valueRef: LLVMValueRef): Pair<String, String>

Returns a pair of the name and symbol name of valueRef.

Link copied to clipboard
fun getOperandValueAtIndex(instr: LLVMValueRef, idx: Int): Expression
Link copied to clipboard
fun guessSlotNumber(valueRef: LLVMValueRef): String
Link copied to clipboard

Determines if a struct with name exists in the scope.

Link copied to clipboard
open override fun locationOf(astNode: Pointer): PhysicalLocation?
Link copied to clipboard
open override fun parse(file: File): TranslationUnitDeclaration
Link copied to clipboard
Link copied to clipboard
open fun process(from: Any, to: Node)
Link copied to clipboard
open fun registerObjectListener(from: Any, biConsumer: BiConsumer<Any, Node>)
Link copied to clipboard
open fun registerPredicateListener(predicate: BiPredicate<Any, Node>, biConsumer: BiConsumer<Any, Node>)
Link copied to clipboard
open override fun setComment(node: Node, astNode: Pointer)
Link copied to clipboard
open override fun typeOf(type: LLVMTypeRef): Type
fun typeOf(valueRef: LLVMValueRef): Type