/src/wrappers/llvm/library/values/llvm_switch_inst.e

http://github.com/tybor/Liberty · Specman e · 33 lines · 13 code · 3 blank · 17 comment · 0 complexity · a9fbfa893f68adcd29a5543801354ac3 MD5 · raw file

  1. class LLVM_SWITCH_INST
  2. -- A multiway switch instruction.
  3. inherit LLVM_TERMINATOR_INST
  4. insert CORE_EXTERNALS
  5. create {LLVM_BUILDER} from_external_pointer
  6. feature {ANY}
  7. add_case (a_value: LLVM_VALUE; a_destionation: LLVM_BASIC_BLOCK)
  8. -- Add to Current the case for `a_value' that will execute `a_destionation'
  9. require
  10. a_value/=Void
  11. a_destionation/=Void
  12. do
  13. llvmadd_case(handle,a_value.handle,a_destionation.handle)
  14. end
  15. end -- class LLVM_SWITCH_INST
  16. -- Copyright (C) 2009-2017: Paolo Redaelli
  17. -- This file is part of LLVM wrappers for Liberty Eiffel.
  18. --
  19. -- This library is free software: you can redistribute it and/or modify
  20. -- it under the terms of the GNU Lesser General Public License as published by
  21. -- the Free Software Foundation, version 3 of the License.
  22. --
  23. -- Liberty Eiffel is distributed in the hope that it will be useful,
  24. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  25. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  26. -- GNU General Public License for more details.
  27. --
  28. -- You should have received a copy of the GNU General Public License
  29. -- along with Liberty Eiffel. If not, see <http://www.gnu.org/licenses/>.
  30. --