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

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