LLVMTypeInteger.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 17 Aug 2015 09:08:47 +0100
changeset 30 c789c1390911
parent 27 b26354bbff25
child 33 feabf14b6c1d
permissions -rw-r--r--
LLVM C API Extensions: added llvm-c-ext/DWARF.h with (some) DWARF constants required to generate debug info. Most importantly, DWARF encoding used when describing a variable to tell the debugger how to interpret the data (as float, signed/unsigned int, etc). More constants will be added as needed.

"
    Copyright (C) 2015-now Jan Vrany

    This code is not an open-source (yet). You may use this code
    for your own experiments and projects, given that:

    * all modification to the code will be sent to the
      original author for inclusion in future releases
    * this is not used in any commercial software

    This license is provisional and may (will) change in
    a future.
"
"{ Package: 'jv:llvm_s' }"

"{ NameSpace: Smalltalk }"

LLVMType subclass:#LLVMTypeInteger
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'LLVM-S-Core-Types'
!

!LLVMTypeInteger class methodsFor:'documentation'!

copyright
"
    Copyright (C) 2015-now Jan Vrany

    This code is not an open-source (yet). You may use this code
    for your own experiments and projects, given that:

    * all modification to the code will be sent to the
      original author for inclusion in future releases
    * this is not used in any commercial software

    This license is provisional and may (will) change in
    a future.
"
! !

!LLVMTypeInteger methodsFor:'accessing'!

sizeInBits
    "For integer, pointer, FP  types, return the size in bits. For all 
     other types, throw an LLVMTypeError.

     LLVMType int32 sizeInBits -> 32
     LLVMType int1 sizeInBits  -> 1
    "
    ^ LLVM GetIntTypeWidth: self

    "Created: / 13-08-2015 / 17:03:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!LLVMTypeInteger methodsFor:'testing'!

isIntegerType
    ^ true

    "Created: / 13-08-2015 / 16:51:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !