/src/wrappers/llvm/library/types/llvm_pointer_type.e

http://github.com/tybor/Liberty · Specman e · 40 lines · 15 code · 5 blank · 20 comment · 0 complexity · bb2fd4fd429b522d5bc7fccdb29fee2b MD5 · raw file

  1. class LLVM_POINTER_TYPE
  2. -- A type representing a pointer to a specified type
  3. inherit LLVM_SEQUENCE_TYPE
  4. create {ANY} make, from_external_pointer
  5. feature {ANY} -- Creation
  6. make (a_type: LLVM_TYPE)
  7. -- Creates a pointer type referring to `a_type'
  8. -- TODO: the C call has an undocumented/misunderstood `unsigned
  9. -- AddressSpace' argument, currently fixed to 0.
  10. require a_type/=Void
  11. do
  12. handle:=llvmpointer_type(a_type.handle, 0.to_natural_32)
  13. end
  14. address_space: NATURAL_32
  15. -- The address space of the pointer
  16. do
  17. Result:=llvmget_pointer_address_space(handle)
  18. end
  19. invariant type_kind.is_pointer_type_kind
  20. end -- class LLVM_POINTER_TYPE
  21. -- Copyright (C) 2009-2017: Paolo Redaelli
  22. -- This file is part of LLVM wrappers for Liberty Eiffel.
  23. --
  24. -- This library is free software: you can redistribute it and/or modify
  25. -- it under the terms of the GNU Lesser General Public License as published by
  26. -- the Free Software Foundation, version 3 of the License.
  27. --
  28. -- Liberty Eiffel is distributed in the hope that it will be useful,
  29. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  30. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  31. -- GNU General Public License for more details.
  32. --
  33. -- You should have received a copy of the GNU General Public License
  34. -- along with Liberty Eiffel. If not, see <http://www.gnu.org/licenses/>.
  35. --