Wrap LLVM’s Module::getNamedValue
This commit is contained in:
parent
723ca4bd4d
commit
2198969f89
2 changed files with 6 additions and 0 deletions
|
@ -924,6 +924,7 @@ extern {
|
||||||
pub fn LLVMSetThreadLocal(GlobalVar: ValueRef, IsThreadLocal: Bool);
|
pub fn LLVMSetThreadLocal(GlobalVar: ValueRef, IsThreadLocal: Bool);
|
||||||
pub fn LLVMIsGlobalConstant(GlobalVar: ValueRef) -> Bool;
|
pub fn LLVMIsGlobalConstant(GlobalVar: ValueRef) -> Bool;
|
||||||
pub fn LLVMSetGlobalConstant(GlobalVar: ValueRef, IsConstant: Bool);
|
pub fn LLVMSetGlobalConstant(GlobalVar: ValueRef, IsConstant: Bool);
|
||||||
|
pub fn LLVMGetNamedValue(M: ModuleRef, Name: *const c_char) -> ValueRef;
|
||||||
|
|
||||||
/* Operations on aliases */
|
/* Operations on aliases */
|
||||||
pub fn LLVMAddAlias(M: ModuleRef,
|
pub fn LLVMAddAlias(M: ModuleRef,
|
||||||
|
|
|
@ -77,6 +77,11 @@ extern "C" void LLVMRustPrintPassTimings() {
|
||||||
TimerGroup::printAll(OS);
|
TimerGroup::printAll(OS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" LLVMValueRef LLVMGetNamedValue(LLVMModuleRef M,
|
||||||
|
const char* Name) {
|
||||||
|
return wrap(unwrap(M)->getNamedValue(Name));
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" LLVMValueRef LLVMGetOrInsertFunction(LLVMModuleRef M,
|
extern "C" LLVMValueRef LLVMGetOrInsertFunction(LLVMModuleRef M,
|
||||||
const char* Name,
|
const char* Name,
|
||||||
LLVMTypeRef FunctionTy) {
|
LLVMTypeRef FunctionTy) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue