mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-19 16:35:10 +00:00
Add two new accessors to the C bindings, patch by Wladimir van der Laan!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74836 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c880815c40
commit
e4840bc611
@ -218,6 +218,7 @@ void LLVMSetTarget(LLVMModuleRef M, const char *Triple);
|
|||||||
/** See Module::addTypeName. */
|
/** See Module::addTypeName. */
|
||||||
int LLVMAddTypeName(LLVMModuleRef M, const char *Name, LLVMTypeRef Ty);
|
int LLVMAddTypeName(LLVMModuleRef M, const char *Name, LLVMTypeRef Ty);
|
||||||
void LLVMDeleteTypeName(LLVMModuleRef M, const char *Name);
|
void LLVMDeleteTypeName(LLVMModuleRef M, const char *Name);
|
||||||
|
LLVMTypeRef LLVMGetTypeByName(LLVMModuleRef M, const char *Name);
|
||||||
|
|
||||||
/** See Module::dump. */
|
/** See Module::dump. */
|
||||||
void LLVMDumpModule(LLVMModuleRef M);
|
void LLVMDumpModule(LLVMModuleRef M);
|
||||||
@ -398,6 +399,7 @@ LLVMValueRef LLVMGetUndef(LLVMTypeRef Ty);
|
|||||||
int LLVMIsConstant(LLVMValueRef Val);
|
int LLVMIsConstant(LLVMValueRef Val);
|
||||||
int LLVMIsNull(LLVMValueRef Val);
|
int LLVMIsNull(LLVMValueRef Val);
|
||||||
int LLVMIsUndef(LLVMValueRef Val);
|
int LLVMIsUndef(LLVMValueRef Val);
|
||||||
|
LLVMValueRef LLVMConstPointerNull(LLVMTypeRef Ty);
|
||||||
|
|
||||||
/* Operations on scalar constants */
|
/* Operations on scalar constants */
|
||||||
LLVMValueRef LLVMConstInt(LLVMTypeRef IntTy, unsigned long long N,
|
LLVMValueRef LLVMConstInt(LLVMTypeRef IntTy, unsigned long long N,
|
||||||
|
@ -101,6 +101,11 @@ void LLVMDeleteTypeName(LLVMModuleRef M, const char *Name) {
|
|||||||
TST.remove(I);
|
TST.remove(I);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLVMTypeRef LLVMGetTypeByName(LLVMModuleRef M, const char *Name) {
|
||||||
|
std::string N(Name);
|
||||||
|
return wrap(unwrap(M)->getTypeByName(N));
|
||||||
|
}
|
||||||
|
|
||||||
void LLVMDumpModule(LLVMModuleRef M) {
|
void LLVMDumpModule(LLVMModuleRef M) {
|
||||||
unwrap(M)->dump();
|
unwrap(M)->dump();
|
||||||
}
|
}
|
||||||
@ -313,6 +318,10 @@ int LLVMIsUndef(LLVMValueRef Val) {
|
|||||||
return isa<UndefValue>(unwrap(Val));
|
return isa<UndefValue>(unwrap(Val));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLVMValueRef LLVMConstPointerNull(LLVMTypeRef Ty) {
|
||||||
|
return wrap(ConstantPointerNull::get(unwrap<PointerType>(Ty)));
|
||||||
|
}
|
||||||
|
|
||||||
/*--.. Operations on scalar constants ......................................--*/
|
/*--.. Operations on scalar constants ......................................--*/
|
||||||
|
|
||||||
LLVMValueRef LLVMConstInt(LLVMTypeRef IntTy, unsigned long long N,
|
LLVMValueRef LLVMConstInt(LLVMTypeRef IntTy, unsigned long long N,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user