"{ Package: 'jv:llvm_s' }"
"{ NameSpace: Smalltalk }"
LLVMObject subclass:#LLVMValue
instanceVariableNames:'type'
classVariableNames:''
poolDictionaries:''
category:'LLVM-Core'
!
!LLVMValue methodsFor:'accessing'!
name
^ LLVM GetValueName: self
"Created: / 11-07-2015 / 07:28:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
name: aString
^ LLVM SetValueName: self _: aString
"Created: / 11-07-2015 / 07:31:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
type
type isNil ifTrue:[
type := LLVM TypeOf: self.
].
^ type
"Created: / 11-07-2015 / 14:53:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!LLVMValue methodsFor:'debugging'!
inspectorExtraAttributes
| d |
d := super inspectorExtraAttributes.
d add: '-dump' -> [ self dumpString ].
^ d
"Created: / 10-07-2015 / 14:36:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!LLVMValue methodsFor:'debugging-dumping'!
dumpOn: aStream
aStream nextPutAll: self dumpString
"Created: / 10-07-2015 / 14:32:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
dumpString
| cstr str|
cstr := LLVM PrintValueToString: self.
str := cstr copyCStringFromHeap.
LLVM DisposeMessage: cstr.
^ str
"Created: / 10-07-2015 / 14:31:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
printOn: aStream
super printOn: aStream.
aStream nextPutAll: ' - '.
aStream nextPutAll: self dumpString
"Created: / 11-07-2015 / 07:09:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!LLVMValue methodsFor:'testing'!
isIntegerOrVectorValue
^ self type isIntegerType or:[ type isVectorType ]
"Created: / 11-07-2015 / 14:55:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 11-07-2015 / 16:49:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
isIntegerValue
^ self type isIntegetType
"Created: / 11-07-2015 / 14:55:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !