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. */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue