forked from OSchip/llvm-project
Adding C bindings for SwitchInst::addCase.
Patch by Bryan O'Sullivan! llvm-svn: 45481
This commit is contained in:
parent
39204d76c5
commit
097102c32a
|
@ -434,6 +434,10 @@ LLVMValueRef LLVMBuildInvoke(LLVMBuilderRef, LLVMValueRef Fn,
|
|||
LLVMValueRef LLVMBuildUnwind(LLVMBuilderRef);
|
||||
LLVMValueRef LLVMBuildUnreachable(LLVMBuilderRef);
|
||||
|
||||
/* Add a case to the switch instruction */
|
||||
void LLVMAddCase(LLVMValueRef Switch, LLVMValueRef OnVal,
|
||||
LLVMBasicBlockRef Dest);
|
||||
|
||||
/* Arithmetic */
|
||||
LLVMValueRef LLVMBuildAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS,
|
||||
const char *Name);
|
||||
|
|
|
@ -813,6 +813,11 @@ LLVMValueRef LLVMBuildUnreachable(LLVMBuilderRef B) {
|
|||
return wrap(unwrap(B)->CreateUnreachable());
|
||||
}
|
||||
|
||||
void LLVMAddCase(LLVMValueRef Switch, LLVMValueRef OnVal,
|
||||
LLVMBasicBlockRef Dest) {
|
||||
unwrap<SwitchInst>(Switch)->addCase(unwrap<ConstantInt>(OnVal), unwrap(Dest));
|
||||
}
|
||||
|
||||
/*--.. Arithmetic ..........................................................--*/
|
||||
|
||||
LLVMValueRef LLVMBuildAdd(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
|
||||
|
|
Loading…
Reference in New Issue