diff options
Diffstat (limited to 'lib/VMCore/Core.cpp')
-rw-r--r-- | lib/VMCore/Core.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp index 66ab03c..bb55d4e 100644 --- a/lib/VMCore/Core.cpp +++ b/lib/VMCore/Core.cpp @@ -532,6 +532,10 @@ LLVMValueRef LLVMAddGlobal(LLVMModuleRef M, LLVMTypeRef Ty, const char *Name) { GlobalValue::ExternalLinkage, 0, Name, unwrap(M))); } +LLVMValueRef LLVMGetNamedGlobal(LLVMModuleRef M, const char *Name) { + return wrap(unwrap(M)->getNamedGlobal(Name)); +} + void LLVMDeleteGlobal(LLVMValueRef GlobalVar) { unwrap<GlobalVariable>(GlobalVar)->eraseFromParent(); } @@ -576,6 +580,10 @@ LLVMValueRef LLVMAddFunction(LLVMModuleRef M, const char *Name, GlobalValue::ExternalLinkage, Name, unwrap(M))); } +LLVMValueRef LLVMGetNamedFunction(LLVMModuleRef M, const char *Name) { + return wrap(unwrap(M)->getFunction(Name)); +} + void LLVMDeleteFunction(LLVMValueRef Fn) { unwrap<Function>(Fn)->eraseFromParent(); } |