Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions llvm/include/llvm-c/Core.h
Original file line number Diff line number Diff line change
Expand Up @@ -3016,6 +3016,13 @@ LLVMValueRef LLVMGetFirstParam(LLVMValueRef Fn);
*/
LLVMValueRef LLVMGetLastParam(LLVMValueRef Fn);

/**
* Obtain function type.
*
* @see llvm::Function::getFunctionType()
*/
LLVMTypeRef LLVMGetFunctionType(LLVMValueRef Fn);

/**
* Obtain the next parameter to a function.
*
Expand Down
4 changes: 4 additions & 0 deletions llvm/lib/IR/Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2658,6 +2658,10 @@ void LLVMSetParamAlignment(LLVMValueRef Arg, unsigned align) {
A->addAttr(Attribute::getWithAlignment(A->getContext(), Align(align)));
}

LLVMTypeRef LLVMGetFunctionType(LLVMValueRef Fn) {
return wrap(unwrap<Function>(Fn)->getFunctionType());
}

/*--.. Operations on ifuncs ................................................--*/

LLVMValueRef LLVMAddGlobalIFunc(LLVMModuleRef M,
Expand Down