/src/wrappers/llvm/library/llvm_type_handle.e

http://github.com/tybor/Liberty · Specman e · 49 lines · 17 code · 10 blank · 22 comment · 0 complexity · 77ab9e312d050f235d09ff1e8a14144a MD5 · raw file

  1. class LLVM_TYPE_HANDLE
  2. -- When building recursive types using (TODO) LLVMRefineType, LLVM_TYPE
  3. -- values may become invalid; LLVM_TYPE_HANDLE may be used to resolve this
  4. -- problem. See the llvm::AbstractTypeHolder class in the documentation of
  5. -- the C++ òobrary.
  6. inherit
  7. OPAQUE_TYPE
  8. EIFFEL_OWNED
  9. insert LLVM_TYPE_FACTORY
  10. create {ANY} from_type, from_external_pointer
  11. feature {ANY}
  12. from_type (a_type: LLVM_TYPE)
  13. -- `a_type' is potentially an abstract type.
  14. require a_type/=Void
  15. do
  16. handle:=llvmcreate_type_handle(a_type.handle)
  17. end
  18. type: LLVM_TYPE
  19. -- Current resolved into an effective type.
  20. do
  21. Result:=type_wrapper(llvmresolve_type_handle(handle))
  22. end
  23. -- TODO: provide refining support: void LLVMRefineType(LLVMTypeRef AbstractTy, LLVMTypeRef ConcreteTy);
  24. end -- class LLVM_TYPE_HANDLE
  25. -- Copyright (C) 2009-2017: Paolo Redaelli
  26. -- This file is part of LLVM wrappers for Liberty Eiffel.
  27. --
  28. -- This library is free software: you can redistribute it and/or modify
  29. -- it under the terms of the GNU Lesser General Public License as published by
  30. -- the Free Software Foundation, version 3 of the License.
  31. --
  32. -- Liberty Eiffel is distributed in the hope that it will be useful,
  33. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  34. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  35. -- GNU General Public License for more details.
  36. --
  37. -- You should have received a copy of the GNU General Public License
  38. -- along with Liberty Eiffel. If not, see <http://www.gnu.org/licenses/>.
  39. --