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

http://github.com/tybor/Liberty · Specman e · 53 lines · 24 code · 9 blank · 20 comment · 0 complexity · c2d2649c934869565600766290391a6e MD5 · raw file

  1. deferred class LLVM_C_TYPES
  2. -- Access to the LLVM_TYPEs representing basic C types.
  3. insert ANY undefine copy, is_equal end
  4. feature {ANY}
  5. -- Commodity queries for commonly used integer types: boolean (1bit),
  6. -- 8,16,32,64 bits and commodoty creation factory-like features
  7. bool: LLVM_INTEGER_TYPE is once create Result.with_1_bit end
  8. int_8: LLVM_INTEGER_TYPE is once create Result.with_8_bits end
  9. int_16: LLVM_INTEGER_TYPE is once create Result.with_16_bits end
  10. int_32: LLVM_INTEGER_TYPE is once create Result.with_32_bits end
  11. int_64: LLVM_INTEGER_TYPE is once create Result.with_64_bits end
  12. feature {ANY} -- Common real types
  13. real_32: LLVM_REAL_TYPE is once create Result.as_float end
  14. real_64: LLVM_REAL_TYPE is once create Result.as_double end
  15. real_80: LLVM_REAL_TYPE is once create Result.as_x86 end
  16. real_128: LLVM_REAL_TYPE is once create Result.with_128bits end
  17. feature {ANY} -- 8-bit character
  18. -- TODO: use a portable way to discover whenever "char" is signed or not. If it will be useful.
  19. char: LLVM_INTEGER_TYPE is once create Result.with_8_bits end
  20. string, string_type: LLVM_POINTER_TYPE is once create Result.make(char) end
  21. feature {ANY} -- Pointers
  22. pointer(a_type: LLVM_TYPE): LLVM_POINTER_TYPE
  23. -- The type of a pointer to `a_type'; i.e. pointer(int_32) represents "int*".
  24. require a_type/=Void
  25. do
  26. create Result.make(a_type)
  27. ensure Result/=Void
  28. end
  29. end -- class LLVM_C_TYPES
  30. -- Copyright (C) 2009-2017: ,2010,2013 Paolo Redaelli - 2013 Cyril Adrian
  31. -- This file is part of LLVM wrappers for Liberty Eiffel.
  32. --
  33. -- This library is free software: you can redistribute it and/or modify
  34. -- it under the terms of the GNU Lesser General Public License as published by
  35. -- the Free Software Foundation, version 3 of the License.
  36. --
  37. -- Liberty Eiffel is distributed in the hope that it will be useful,
  38. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  39. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  40. -- GNU General Public License for more details.
  41. --
  42. -- You should have received a copy of the GNU General Public License
  43. -- along with Liberty Eiffel. If not, see <http://www.gnu.org/licenses/>.
  44. --