Value factory and more Constant subclasses.
git-svn-id: http://llvm-py.googlecode.com/svn/trunk@64 8d1e9007-1d4e-0410-b67e-1979fd6579aa
This commit is contained in:
parent
a339b69193
commit
d7a5d30029
4 changed files with 326 additions and 148 deletions
|
|
@ -321,6 +321,7 @@ _wrap_obj2str(LLVMGetValueName, LLVMValueRef)
|
|||
_wrap_objstr2none(LLVMSetValueName, LLVMValueRef)
|
||||
_wrap_obj2none(LLVMDumpValue, LLVMValueRef)
|
||||
_wrap_dumper(LLVMDumpValueToString, LLVMValueRef)
|
||||
_wrap_obj2obj(LLVMValueGetID, LLVMValueRef, int)
|
||||
|
||||
/*===-- Constant Values --------------------------------------------------===*/
|
||||
|
||||
|
|
@ -1110,6 +1111,7 @@ static PyMethodDef core_methods[] = {
|
|||
_method( LLVMSetValueName )
|
||||
_method( LLVMDumpValue )
|
||||
_method( LLVMDumpValueToString )
|
||||
_method( LLVMValueGetID )
|
||||
|
||||
/* Constant Values */
|
||||
|
||||
|
|
|
|||
461
llvm/core.py
461
llvm/core.py
File diff suppressed because it is too large
Load diff
|
|
@ -291,6 +291,14 @@ LLVMValueRef LLVMBuildGetResult(LLVMBuilderRef builder,
|
|||
return llvm::wrap(builderp->CreateExtractValue(llvm::unwrap(value), index, name));
|
||||
}
|
||||
|
||||
unsigned LLVMValueGetID(LLVMValueRef value)
|
||||
{
|
||||
llvm::Value *valuep = llvm::unwrap(value);
|
||||
assert(valuep);
|
||||
|
||||
return valuep->getValueID();
|
||||
}
|
||||
|
||||
LLVMValueRef LLVMGetIntrinsic(LLVMModuleRef module, int id,
|
||||
LLVMTypeRef *types, unsigned n_types)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -66,6 +66,9 @@ LLVMValueRef LLVMBuildRetMultiple(LLVMBuilderRef bulder, LLVMValueRef *values,
|
|||
LLVMValueRef LLVMBuildGetResult(LLVMBuilderRef builder, LLVMValueRef value,
|
||||
unsigned index, const char *name);
|
||||
|
||||
/* Wraps llvm::Value::getValueID(). */
|
||||
unsigned LLVMValueGetID(LLVMValueRef value);
|
||||
|
||||
/* Wraps llvm::ConstantExpr::getVICmp(). */
|
||||
LLVMValueRef LLVMConstVICmp(LLVMIntPredicate predicate, LLVMValueRef lhs,
|
||||
LLVMValueRef rhs);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue