diff options
author | Gordon Henriksen <gordonhenriksen@mac.com> | 2008-01-01 05:50:53 +0000 |
---|---|---|
committer | Gordon Henriksen <gordonhenriksen@mac.com> | 2008-01-01 05:50:53 +0000 |
commit | ab477ccde9382b58d3883eeb574ba09469d4cde8 (patch) | |
tree | ba54a82afb8a1abe9a4e82a07c585847f2f19718 /lib/VMCore/Core.cpp | |
parent | a91a7d594ff1e1503731ca92f72e627bdfd18f3f (diff) | |
download | external_llvm-ab477ccde9382b58d3883eeb574ba09469d4cde8.zip external_llvm-ab477ccde9382b58d3883eeb574ba09469d4cde8.tar.gz external_llvm-ab477ccde9382b58d3883eeb574ba09469d4cde8.tar.bz2 |
Adding C bindings for SwitchInst::addCase.
Patch by Bryan O'Sullivan!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45481 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Core.cpp')
-rw-r--r-- | lib/VMCore/Core.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp index fe41427..8722785 100644 --- a/lib/VMCore/Core.cpp +++ b/lib/VMCore/Core.cpp @@ -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, |