Small fix in LLVM C and LLVM C Extensions library mappings
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 13 Aug 2015 06:01:15 +0100
changeset 44 e698efa3708b
parent 43 9327987437ae
child 45 86de1611e013
Small fix in LLVM C and LLVM C Extensions library mappings Manually resolve C type LLVMValueRef to Smalltalk's LLCMValue class. Map LLVMBuilderRef to LLVMIRBuilder class.
Cface__LLVM_C.st
Cface__LLVM_C_EXT.st
--- a/Cface__LLVM_C.st	Wed Aug 12 07:32:13 2015 +0100
+++ b/Cface__LLVM_C.st	Thu Aug 13 06:01:15 2015 +0100
@@ -101,7 +101,7 @@
     (className notNil and:[(class := Smalltalk at: className) notNil]) ifTrue:[
         ^class category
     ].
-    ^'LLVM-Core'
+    ^'LLVM-S-Core'
 
     "Created: / 05-09-2012 / 11:15:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 30-06-2015 / 13:53:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -126,6 +126,9 @@
 
     | baseName |
 
+    type cName = 'LLVMBuilderRef' ifTrue:[
+    	^'LLVMIRBuilder'
+    ].
     baseName := super smalltalkClassNameForDerivedType:type.
     (baseName endsWith: 'Ref') ifTrue:[
         baseName := baseName copyTo: baseName size - 3
--- a/Cface__LLVM_C_EXT.st	Wed Aug 12 07:32:13 2015 +0100
+++ b/Cface__LLVM_C_EXT.st	Thu Aug 13 06:01:15 2015 +0100
@@ -54,12 +54,19 @@
     "/ A hack to set Smalltalk classname for LLVMContextRef as it is not
     "/ typedefd in headers
     definitionFile definitions do:[:each | 
-        ((each isKindOf: CTypedefNode) and:[ each cName = 'LLVMContextRef' ]) ifTrue:[ 
-            each smalltalkName: #LLVMContext  
+        (each isKindOf: CTypedefNode) ifTrue:[
+            each cName = 'LLVMContextRef' ifTrue:[ 
+                each smalltalkName: #LLVMContext  
+            ].
+            each cName = 'LLVMValueRef' ifTrue:[ 
+                each smalltalkName: #LLVMValue
+            ].            
         ].
     ].
 
     "Created: / 12-08-2015 / 07:24:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 13-08-2015 / 05:56:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+
 ! !
 
 !LLVM_C_EXT methodsFor:'mapping - class names'!