Forgot to push files for previous commit.
This commit is contained in:
parent
fa4927e1fb
commit
d939728938
3 changed files with 270 additions and 0 deletions
19
newbinding/src/BasicBlock.py
Normal file
19
newbinding/src/BasicBlock.py
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
from binding import *
|
||||||
|
from namespace import llvm
|
||||||
|
from Value import Function, BasicBlock
|
||||||
|
from LLVMContext import LLVMContext
|
||||||
|
from StringRef import StringRef
|
||||||
|
|
||||||
|
@BasicBlock
|
||||||
|
class BasicBlock:
|
||||||
|
Create = StaticMethod(ptr(BasicBlock), ref(LLVMContext),
|
||||||
|
cast(str, StringRef),
|
||||||
|
ptr(Function),
|
||||||
|
ptr(BasicBlock))
|
||||||
|
|
||||||
|
getParent = Method(ptr(Function))
|
||||||
|
empty = Method(cast(Bool, bool))
|
||||||
|
dropAllReferences = Method()
|
||||||
|
isLandingPad = Method(cast(Bool, bool))
|
||||||
|
removePredecessor = Method(Void, ptr(BasicBlock), cast(bool, Bool))
|
||||||
|
removePredecessor |= Method(Void, ptr(BasicBlock))
|
||||||
21
newbinding/src/IRBuilder.py
Normal file
21
newbinding/src/IRBuilder.py
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
from binding import *
|
||||||
|
from namespace import llvm
|
||||||
|
from LLVMContext import LLVMContext
|
||||||
|
from BasicBlock import BasicBlock
|
||||||
|
from Instruction import ReturnInst
|
||||||
|
|
||||||
|
IRBuilder = llvm.Class()
|
||||||
|
|
||||||
|
@IRBuilder
|
||||||
|
class IRBuilder:
|
||||||
|
_include_ = 'llvm/IRBuilder.h'
|
||||||
|
_realname_ = 'IRBuilder<>'
|
||||||
|
|
||||||
|
new = Constructor(ref(LLVMContext))
|
||||||
|
delete = Destructor()
|
||||||
|
|
||||||
|
SetInsertPoint = Method(Void, ptr(BasicBlock))
|
||||||
|
|
||||||
|
isNamePreserving = Method(cast(Bool, bool))
|
||||||
|
|
||||||
|
CreateRetVoid = Method(ptr(ReturnInst))
|
||||||
230
newbinding/src/Instruction.py
Normal file
230
newbinding/src/Instruction.py
Normal file
|
|
@ -0,0 +1,230 @@
|
||||||
|
from binding import *
|
||||||
|
from namespace import llvm
|
||||||
|
from Value import User
|
||||||
|
|
||||||
|
Instruction = llvm.Class(User)
|
||||||
|
AtomicCmpXchgInst = llvm.Class(Instruction)
|
||||||
|
AtomicRMWInst = llvm.Class(Instruction)
|
||||||
|
BinaryOperator = llvm.Class(Instruction)
|
||||||
|
CallInst = llvm.Class(Instruction)
|
||||||
|
CmpInst = llvm.Class(Instruction)
|
||||||
|
ExtractElementInst = llvm.Class(Instruction)
|
||||||
|
FenceInst = llvm.Class(Instruction)
|
||||||
|
GetElementPtrInst = llvm.Class(Instruction)
|
||||||
|
InsertElementInst = llvm.Class(Instruction)
|
||||||
|
InsertValueInst = llvm.Class(Instruction)
|
||||||
|
LandingPadInst = llvm.Class(Instruction)
|
||||||
|
PHINode = llvm.Class(Instruction)
|
||||||
|
SelectInst = llvm.Class(Instruction)
|
||||||
|
ShuffleVectorInst = llvm.Class(Instruction)
|
||||||
|
StoreInst = llvm.Class(Instruction)
|
||||||
|
TerminatorInst = llvm.Class(Instruction)
|
||||||
|
UnaryInstruction = llvm.Class(Instruction)
|
||||||
|
|
||||||
|
IntrinsicInst = llvm.Class(CallInst)
|
||||||
|
|
||||||
|
FCmpInst = llvm.Class(CmpInst)
|
||||||
|
ICmpInst = llvm.Class(CmpInst)
|
||||||
|
|
||||||
|
|
||||||
|
BranchInst = llvm.Class(TerminatorInst)
|
||||||
|
IndirectBrInst = llvm.Class(TerminatorInst)
|
||||||
|
ResumeInst = llvm.Class(TerminatorInst)
|
||||||
|
ReturnInst = llvm.Class(TerminatorInst)
|
||||||
|
SwitchInst = llvm.Class(TerminatorInst)
|
||||||
|
UnreachableInst = llvm.Class(TerminatorInst)
|
||||||
|
|
||||||
|
AllocaInst = llvm.Class(UnaryInstruction)
|
||||||
|
CastInst = llvm.Class(UnaryInstruction)
|
||||||
|
ExtractValueInst = llvm.Class(UnaryInstruction)
|
||||||
|
LoadInst = llvm.Class(UnaryInstruction)
|
||||||
|
VAArgInst = llvm.Class(UnaryInstruction)
|
||||||
|
|
||||||
|
DbgInfoIntrinsic = llvm.Class(IntrinsicInst)
|
||||||
|
MemIntrinsic = llvm.Class(IntrinsicInst)
|
||||||
|
VACopyInst = llvm.Class(IntrinsicInst)
|
||||||
|
VAEndInst = llvm.Class(IntrinsicInst)
|
||||||
|
VAStartInst = llvm.Class(IntrinsicInst)
|
||||||
|
|
||||||
|
BitCastInst = llvm.Class(CastInst)
|
||||||
|
FPExtInst = llvm.Class(CastInst)
|
||||||
|
FPToSIInst = llvm.Class(CastInst)
|
||||||
|
FPToUIInst = llvm.Class(CastInst)
|
||||||
|
FPTruncInst = llvm.Class(CastInst)
|
||||||
|
|
||||||
|
@Instruction
|
||||||
|
class Instruction:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@AtomicCmpXchgInst
|
||||||
|
class AtomicCmpXchgInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@AtomicRMWInst
|
||||||
|
class AtomicRMWInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@BinaryOperator
|
||||||
|
class BinaryOperator:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@CallInst
|
||||||
|
class CallInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@CmpInst
|
||||||
|
class CmpInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@ExtractElementInst
|
||||||
|
class ExtractElementInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@FenceInst
|
||||||
|
class FenceInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@GetElementPtrInst
|
||||||
|
class GetElementPtrInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@InsertElementInst
|
||||||
|
class InsertElementInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@InsertValueInst
|
||||||
|
class InsertValueInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@LandingPadInst
|
||||||
|
class LandingPadInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@PHINode
|
||||||
|
class PHINode:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@SelectInst
|
||||||
|
class SelectInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@ShuffleVectorInst
|
||||||
|
class ShuffleVectorInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@StoreInst
|
||||||
|
class StoreInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@TerminatorInst
|
||||||
|
class TerminatorInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@UnaryInstruction
|
||||||
|
class UnaryInstruction:
|
||||||
|
pass
|
||||||
|
|
||||||
|
#call
|
||||||
|
|
||||||
|
@IntrinsicInst
|
||||||
|
class IntrinsicInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
#compare
|
||||||
|
|
||||||
|
@FCmpInst
|
||||||
|
class FCmpInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@ICmpInst
|
||||||
|
class ICmpInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
# terminator
|
||||||
|
@BranchInst
|
||||||
|
class BranchInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@IndirectBrInst
|
||||||
|
class IndirectBrInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@ResumeInst
|
||||||
|
class ResumeInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@ReturnInst
|
||||||
|
class ReturnInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@SwitchInst
|
||||||
|
class SwitchInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@UnreachableInst
|
||||||
|
class UnreachableInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
# unary
|
||||||
|
@AllocaInst
|
||||||
|
class AllocaInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@CastInst
|
||||||
|
class CastInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@ExtractValueInst
|
||||||
|
class ExtractValueInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@LoadInst
|
||||||
|
class LoadInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@VAArgInst
|
||||||
|
class VAArgInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
# intrinsic
|
||||||
|
@DbgInfoIntrinsic
|
||||||
|
class DbgInfoIntrinsic:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@MemIntrinsic
|
||||||
|
class MemIntrinsic:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@VACopyInst
|
||||||
|
class VACopyInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@VAEndInst
|
||||||
|
class VAEndInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@VAStartInst
|
||||||
|
class VAStartInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@BitCastInst
|
||||||
|
class BitCastInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@FPExtInst
|
||||||
|
class FPExtInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@FPToSIInst
|
||||||
|
class FPToSIInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@FPToUIInst
|
||||||
|
class FPToUIInst:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@FPTruncInst
|
||||||
|
class FPTruncInst:
|
||||||
|
pass
|
||||||
Loading…
Add table
Add a link
Reference in a new issue