summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MLKLLVMCompiler.mm3
1 files changed, 3 insertions, 0 deletions
diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm
index 7490b32..249ac39 100644
--- a/MLKLLVMCompiler.mm
+++ b/MLKLLVMCompiler.mm
@@ -130,6 +130,9 @@ static FunctionPassManager *fpm;
MLKForm *form;
Value *value;
+ if ([_bodyForms count] == 0)
+ value = ConstantPointerNull::get (PointerType::get(Type::VoidTy, 0));
+
while ((form = [e nextObject]))
{
value = [form processForLLVM];