Fix incomplete merge from scratch branch
git-svn-id: http://llvm-py.googlecode.com/svn/trunk@102 8d1e9007-1d4e-0410-b67e-1979fd6579aa
This commit is contained in:
parent
b7fa3e8fa1
commit
bb2d613e39
5 changed files with 17 additions and 1 deletions
|
|
@ -538,6 +538,7 @@ _wrap_obj2obj(LLVMGetParamParent, LLVMValueRef, LLVMValueRef)
|
|||
_wrap_objenum2none(LLVMAddAttribute, LLVMValueRef, LLVMAttribute)
|
||||
_wrap_objenum2none(LLVMRemoveAttribute, LLVMValueRef, LLVMAttribute)
|
||||
_wrap_objenum2none(LLVMSetParamAlignment, LLVMValueRef, LLVMAttribute)
|
||||
_wrap_obj2obj(LLVMGetParamAlignment, LLVMValueRef, int)
|
||||
|
||||
/*===-- Basic Blocks -----------------------------------------------------===*/
|
||||
|
||||
|
|
@ -1401,6 +1402,7 @@ static PyMethodDef core_methods[] = {
|
|||
_method( LLVMAddAttribute )
|
||||
_method( LLVMRemoveAttribute )
|
||||
_method( LLVMSetParamAlignment )
|
||||
_method( LLVMGetParamAlignment )
|
||||
|
||||
/* Basic Blocks */
|
||||
_method( LLVMGetBasicBlockParent )
|
||||
|
|
|
|||
|
|
@ -463,6 +463,15 @@ int LLVMInlineFunction(LLVMValueRef call)
|
|||
return llvm::InlineFunction(cs, unused);
|
||||
}
|
||||
|
||||
unsigned LLVMGetParamAlignment(LLVMValueRef arg)
|
||||
{
|
||||
llvm::Argument *argp = llvm::unwrap<llvm::Argument>(arg);
|
||||
assert(argp);
|
||||
|
||||
unsigned argno = argp->getArgNo();
|
||||
|
||||
return argp->getParent()->getParamAlignment(argno + 1);
|
||||
}
|
||||
|
||||
/* Passes. A few passes (listed below) are used directly from LLVM-C,
|
||||
* rest are defined here.
|
||||
|
|
|
|||
|
|
@ -183,6 +183,10 @@ void *LLVMGetPointerToFunction(LLVMExecutionEngineRef ee, LLVMValueRef fn);
|
|||
* containing the call is still in a proper state (not changed). */
|
||||
int LLVMInlineFunction(LLVMValueRef call);
|
||||
|
||||
/* Wraps llvm::getAlignmentFromAttrs from Attributes.h. Compliments the
|
||||
* already available LLVMSetParamAlignment(). */
|
||||
unsigned LLVMGetParamAlignment(LLVMValueRef arg);
|
||||
|
||||
/* Passes. Some passes are used directly from LLVM-C, rest are declared
|
||||
* here. */
|
||||
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ You can make a difference, just by:
|
|||
|
||||
Useful links:
|
||||
|
||||
- Google code hosting: http://code.google.com/p/llvm-py/[http://code.google.com/p/llvm-py/]
|
||||
- Browse SVN: http://code.google.com/p/llvm-py/source/browse/[http://code.google.com/p/llvm-py/source/browse]
|
||||
- Issues tracker: http://code.google.com/p/llvm-py/issues/list[http://code.google.com/p/llvm-py/issues/list]
|
||||
- Discussions: http://groups.google.com/group/llvm-py[http://groups.google.com/group/llvm-py]
|
||||
|
||||
SVN HEAD can be checked out like so:
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ The latest release is 0.6, released 31-Aug-2010 (link:#changelog[Changelog]
|
|||
below). 0.6 works only with LLVM 2.7.
|
||||
|
||||
Download it here:
|
||||
|
||||
* http://llvm-py.googlecode.com/files/llvm-py-0.6.tar.bz2[llvm-py-0.6.tar.bz2] (primary)
|
||||
* link:llvm-py-0.6.tar.bz2[llvm-py-0.6.tar.bz2] (mirror)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue