/src/wrappers/llvm/library/iterators/iterator_over_function_parameters.e

http://github.com/tybor/Liberty · Specman e · 90 lines · 39 code · 13 blank · 38 comment · 0 complexity · a1bee255b5469246747a95c5427a3593 MD5 · raw file

  1. -- This file is part of a Liberty Eiffel library.
  2. -- See the full copyright at the end.
  3. --
  4. class ITERATOR_OVER_FUNCTION_PARAMETERS
  5. inherit
  6. BIDIRECTIONAL_ITERATOR[LLVM_VALUE]
  7. WRAPPER_HANDLER
  8. LLVM_VALUE_WRAPPER_FACTORY
  9. insert CORE_EXTERNALS
  10. create {LLVM_FUNCTION} from_function
  11. feature {LLVM_FUNCTION}
  12. from_function (a_function: LLVM_FUNCTION)
  13. require a_function/=Void
  14. do
  15. function:=a_function
  16. end
  17. function: LLVM_FUNCTION
  18. feature {ANY}
  19. is_off: BOOLEAN
  20. do
  21. Result:=(item=Void)
  22. end
  23. start
  24. do
  25. item:=value_wrapper_or_void(llvmget_first_param(function.handle))
  26. end
  27. finish
  28. do
  29. item:=value_wrapper_or_void(llvmget_last_param(function.handle))
  30. end
  31. next
  32. do
  33. item:=value_wrapper_or_void(llvmget_next_param(item.handle))
  34. end
  35. previous
  36. do
  37. item:=value_wrapper_or_void(llvmget_previous_param(item.handle))
  38. end
  39. item: LLVM_VALUE is attribute end
  40. -- This feature is unnecessary when inheriting from LLVM_VALUE_FACTORY: wrapper (p: POINTER): LLVM_VALUE do create Result.from_external_pointer(p) end
  41. generation, iterable_generation: INTEGER is 0
  42. invariant function/=Void
  43. end -- class ITERATOR_OVER_FUNCTION_PARAMETERS
  44. --
  45. -- Copyright (C) 2009-2017: by all the people cited in the AUTHORS file.
  46. --
  47. -- Permission is hereby granted, free of charge, to any person obtaining a copy
  48. -- of this software and associated documentation files (the "Software"), to deal
  49. -- in the Software without restriction, including without limitation the rights
  50. -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  51. -- copies of the Software, and to permit persons to whom the Software is
  52. -- furnished to do so, subject to the following conditions:
  53. --
  54. -- The above copyright notice and this permission notice shall be included in
  55. -- all copies or substantial portions of the Software.
  56. --
  57. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  58. -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  59. -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  60. -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  61. -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  62. -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  63. -- THE SOFTWARE.
  64. -- This file is part of LLVM wrappers for Liberty Eiffel.
  65. --
  66. -- This library is free software: you can redistribute it and/or modify
  67. -- it under the terms of the GNU Lesser General Public License as published by
  68. -- the Free Software Foundation, version 3 of the License.
  69. --
  70. -- Liberty Eiffel is distributed in the hope that it will be useful,
  71. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  72. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  73. -- GNU General Public License for more details.
  74. --
  75. -- You should have received a copy of the GNU General Public License
  76. -- along with Liberty Eiffel. If not, see <http://www.gnu.org/licenses/>.
  77. --