PageRenderTime 8ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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