Prevent instantiation of LLVMDIBuilder with #new
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 05 Oct 2015 12:17:47 +0100
changeset 48 86d3a994614f
parent 47 d1d3901866d4
child 49 aa3ce5de5ee8
Prevent instantiation of LLVMDIBuilder with #new To prevent SIGSEGVs. LLVMDIBuilder can only be instantiated on a module, so one must use #newForModule:
LLVMDIBuilder.st
--- a/LLVMDIBuilder.st	Tue Sep 29 17:00:22 2015 +0100
+++ b/LLVMDIBuilder.st	Mon Oct 05 12:17:47 2015 +0100
@@ -42,6 +42,12 @@
 
 !LLVMDIBuilder class methodsFor:'instance creation'!
 
+new
+    self shouldNotImplement. "/ use newForModule: instead
+
+    "Created: / 05-10-2015 / 09:29:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 newForModule: module
     | dib |
     dib := LLVMCEXT NewDIBuilder: module.
@@ -278,3 +284,10 @@
     "Modified: / 14-08-2015 / 13:20:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!LLVMDIBuilder class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+