aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/VMCore/Core.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp
index 6eb1889..ac2dfcc 100644
--- a/lib/VMCore/Core.cpp
+++ b/lib/VMCore/Core.cpp
@@ -101,6 +101,11 @@ void LLVMDeleteTypeName(LLVMModuleRef M, const char *Name) {
TST.remove(I);
}
+LLVMTypeRef LLVMGetTypeByName(LLVMModuleRef M, const char *Name) {
+ std::string N(Name);
+ return wrap(unwrap(M)->getTypeByName(N));
+}
+
void LLVMDumpModule(LLVMModuleRef M) {
unwrap(M)->dump();
}
@@ -313,6 +318,10 @@ int LLVMIsUndef(LLVMValueRef Val) {
return isa<UndefValue>(unwrap(Val));
}
+LLVMValueRef LLVMConstPointerNull(LLVMTypeRef Ty) {
+ return wrap(ConstantPointerNull::get(unwrap<PointerType>(Ty)));
+}
+
/*--.. Operations on scalar constants ......................................--*/
LLVMValueRef LLVMConstInt(LLVMTypeRef IntTy, unsigned long long N,