PageRenderTime 24ms CodeModel.GetById 20ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

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