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

http://github.com/tybor/Liberty · Specman e · 44 lines · 4 code · 6 blank · 34 comment · 0 complexity · ef68454bf9a7e7f6635fcd786872e2fc MD5 · raw file

  1. deferred class LLVM_USER
  2. -- Ancestor of constants, operators and instructions (and meta-database).
  3. -- The User class is the common base class of all LLVM nodes that may refer
  4. -- to Values. It exposes a list of "Operands" that are all of the Values
  5. -- that the User is referring to. The User class itself is a subclass of
  6. -- Value.
  7. -- The operands of a User point directly to the LLVM Value that it refers
  8. -- to. Because LLVM uses Static Single Assignment (SSA) form, there can
  9. -- only be one definition referred to, allowing this direct connection.
  10. -- This connection provides the use-def information in LLVM.
  11. inherit LLVM_VALUE
  12. feature {ANY} -- TODO:Important Public Members of the User class
  13. -- The User class exposes the operand list in two ways: through an index access interface and through an iterator based interface.
  14. --
  15. -- operand (an_index: NATURAL_32): LLVM_VALUE is Value *getOperand(unsigned i)
  16. -- unsigned getNumOperands()
  17. -- These two methods expose the operands of the User in a convenient form for direct access.
  18. --
  19. -- User::op_iterator - Typedef for iterator over the operand list
  20. -- op_iterator op_begin() - Get an iterator to the start of the operand list.
  21. -- op_iterator op_end() - Get an iterator to the end of the operand list.
  22. -- Together, these methods make up the iterator based interface to the operands of a User.
  23. end -- class LLVM_USER
  24. -- Copyright (C) 2009-2017: ,2010,2013 Paolo Redaelli - 2013 Cyril Adrian
  25. -- This file is part of LLVM wrappers for Liberty Eiffel.
  26. --
  27. -- This library is free software: you can redistribute it and/or modify
  28. -- it under the terms of the GNU Lesser General Public License as published by
  29. -- the Free Software Foundation, version 3 of the License.
  30. --
  31. -- Liberty Eiffel is distributed in the hope that it will be useful,
  32. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  33. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  34. -- GNU General Public License for more details.
  35. --
  36. -- You should have received a copy of the GNU General Public License
  37. -- along with Liberty Eiffel. If not, see <http://www.gnu.org/licenses/>.
  38. --