equal
deleted
inserted
replaced
16 "{ NameSpace: Smalltalk }" |
16 "{ NameSpace: Smalltalk }" |
17 |
17 |
18 LLVMDisposableObject subclass:#LLVMModule |
18 LLVMDisposableObject subclass:#LLVMModule |
19 instanceVariableNames:'' |
19 instanceVariableNames:'' |
20 classVariableNames:'' |
20 classVariableNames:'' |
21 poolDictionaries:'LLVMTypeKind' |
21 poolDictionaries:'LLVMTypeKind LLVMVerifierFailureAction' |
22 category:'LLVM-S-Core' |
22 category:'LLVM-S-Core' |
23 ! |
23 ! |
24 |
24 |
25 !LLVMModule class methodsFor:'documentation'! |
25 !LLVMModule class methodsFor:'documentation'! |
26 |
26 |
221 priority:50; |
221 priority:50; |
222 text: [ self dumpString ]; |
222 text: [ self dumpString ]; |
223 yourself |
223 yourself |
224 |
224 |
225 "Created: / 05-08-2015 / 23:29:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
225 "Created: / 05-08-2015 / 23:29:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
226 ! ! |
|
227 |
|
228 !LLVMModule methodsFor:'utilities'! |
|
229 |
|
230 verify |
|
231 "Verifies that a module is valid. If yes, this method is no-op. |
|
232 If false, throws LLVMModuleVerificationError." |
|
233 |
|
234 | msgPtr msg | |
|
235 |
|
236 msgPtr := ExternalBytes new: ExternalBytes sizeofPointer. |
|
237 |
|
238 (LLVM VerifyModule: self _: LLVMReturnStatusAction _: msgPtr) ifTrue:[ |
|
239 msg := (msgPtr pointerAt: 1) copyCStringFromHeap. |
|
240 LLVM DisposeMessage: (msgPtr pointerAt: 1). |
|
241 LLVMModuleVerificationError signal: msg. |
|
242 ]. |
|
243 |
|
244 "Created: / 18-06-2016 / 15:48:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
226 ! ! |
245 ! ! |
227 |
246 |
228 !LLVMModule methodsFor:'writing-assembly'! |
247 !LLVMModule methodsFor:'writing-assembly'! |
229 |
248 |
230 writeAssemblyOn: aStream |
249 writeAssemblyOn: aStream |